Two Laptop Bag*
The moose likes Tomcat and the fly likes To Budi and Paul Reg Webapp class Loader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "To Budi and Paul Reg Webapp class Loader" Watch "To Budi and Paul Reg Webapp class Loader" New topic
Author

To Budi and Paul Reg Webapp class Loader

Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
Hi Budi, and Paul,

Greetings to you people. I already have a question in store for you, in this Forum, I don't know you had a look at it. My sound silly, but that was a question i wanted to ask you people.
Tha's Here

Well...now to add to that, i would like to know whether Webapp class Loader is by any means analogous to the Java Class Loader.

And also would like to explore a bit into the mechanism of generating a Servlet from the JSP. Like which all to place inside the _jspService, etc.

Thanks in advance.....

Cheers,
Swamy
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
And also would like to explore a bit into the mechanism of generating a Servlet from the JSP. Like which all to place inside the _jspService, etc.


JSP Overview Part 1

JSP Overview Part 2



This will help you understand in process of translate JSP to Servlet.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
Hi Som,

Thanks a lot for th resources.

Cheers,
Swamy



somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
And more detail ::

Tomcat use Jasper (JSP Engine) to compile/check JSP follow to JSP Specification.

I'm reference to Tomcat 5.0 Document from
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html

Tomcat 5.0 uses the Jasper 2 JSP Engine to implement the JavaServer Pages 2.0 specification.

Jasper 2 has been redesigned to significantly improve performance over the orignal Jasper. In addition to general code improvements the following changes were made:

JSP Custom Tag Pooling - The java objects instantiated for JSP Custom Tags can now be pooled and reused. This significantly boosts the performance of JSP pages which use custom tags.
Background JSP compilation - If you make a change to a JSP page which had already been compiled Jasper 2 can recompile that page in the background. The previously compiled JSP page will still be available to serve requests. Once the new page has been compiled successfully it will replace the old page. This helps improve availablity of your JSP pages on a production server.
Recompile JSP when included page changes - Jasper 2 can now detect when a page included at compile time from a JSP has changed and then recompile the parent JSP.
Ant used to compile JSP pages - The Ant Build Tool is now used to perform JSP java source code compilation.

Jasper is implemented using the servlet class org.apache.jasper.servlet.JspServlet.
Budi Kurniawan
author
Greenhorn

Joined: Sep 15, 2004
Posts: 12
The WebappClassLoader does more than simply loading Java classes. For example, it has a background thread (in Tomcat 4) and uses the common background thread (Tomcat 5) to support automatic application reload, i.e. if the web.xml or any .jar file has changed.


Author of <a href="http://www.amazon.com/exec/obidos/ASIN/097521280X/ref=jranch-20" target="_blank" rel="nofollow">How Tomcat Works</a>
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Originally posted by Budi Kurniawan:
The WebappClassLoader does more than simply loading Java classes. For example, it has a background thread (in Tomcat 4) and uses the common background thread (Tomcat 5) to support automatic application reload, i.e. if the web.xml or any .jar file has changed.


Thank you, i will use it in tomcat server.
Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
Hi Budi,

That's what i was looking for...The automatic reloading of Applications.

Well....Does Tomcat support automatic reloading, when my servlet is changed, like the Class file is modified.

Sometime i get the message - "Webapp class loader modified" but this version of mine doesn't do that and requires a start. Shud i make any configurational change to accomplish this. And about the name, any significant reason?

Thanks in Advance..

Cheers,
Swamy
 
jQuery in Action, 2nd edition
 
subject: To Budi and Paul Reg Webapp class Loader
 
Similar Threads
How do you read a resource from the root of an exploded webapp?
Scope of Singleton
Maven Archtype - Solutions / idea needed
To HowTomcatWorks Authors
Who is the book meant for?