In servlet,java will be used to generate dynamic HTML pages,but in JSP,java will be reduced and we can use our custom tags to generate HTML pages.:In servlet if any change in your class file you must redeploy again but jsp only one you have to deploy. in compare to servlet jsp reduce code and contains implicit objects.:Question: :Servlets-:JSP page has both presentation logic and business logic but servlet has only business logic and presentation logic is present in html file:Jsp is nothing but a servlet.jsp is transfered to servlet by jsp engine.after converting it acts like a servlet.in servlets static content and dynamic content are combined.we can avoid this using jsp.we can separate static content from dynamic content.so this makes the application very flexible.:servlets will allow only java code ie other than java code like html,javascript can be written in out.println()statements only.but,jsp allows us code other than java also.jsp dirctly allows us to write templet text,scripts,jstl,java code:In jsp html pages with javacode embedded inside of them.In servlets java programs with html embedded inside of them.:In servlet java code can&
Category:Servlet Interview Questions
No comments:
Post a Comment