JSP and Servlet
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   rk_ki
Posted On:   Tuesday, November 19, 2002 06:14 AM


Can anyone tell me why JSP is converted in Servlet? y is not converted directly into a class?

Re: JSP and Servlet

Posted By:   Parag_Bahad  
Posted On:   Tuesday, November 19, 2002 09:41 PM

JSP are enhanced form of servlet. You can use HTML, XML to embed in JSP, so that you can quickly develope the UI. To do the same thing in servlet you need to write out.println() so many times. Secondly there are so many good features in JSP for quick developement. JSP is text document. JSP engine translets it into servlet at run time, it makes jspInit() methods jspService() etc at run time and then it compiles it to create a .class file. JVM uses this dot class file. The final result of the JSP is .class file which is same as when you compile servlet source file. JSP has one more layer of abstraction. You can translate JSP into .java file using the utilities with some servers like tomcat or Weblogic. And then make it into .class file. So that you can avoid the time required by JSP engine to convert it into servlet and complie at runtime.



All right?


Cheers!

~Parag

Re: JSP and Servlet

Posted By:   Benoit_Quintin  
Posted On:   Tuesday, November 19, 2002 07:46 AM

What do you mean converted in a servlet??? It gets compiled into a class...

Re: JSP and Servlet

Posted By:   Anonymous  
Posted On:   Tuesday, November 19, 2002 06:37 AM

A servlet IS a class, I don't understand your question...

Re: JSP and Servlet

Posted By:   David_Liu  
Posted On:   Tuesday, November 19, 2002 06:36 AM

Are servlets not classes?
About | Sitemap | Contact