> -----Original Message-----
> From: Scott Stirling [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 05, 2001 3:58 PM
> To: [EMAIL PROTECTED]
> Subject: Re: cvs commit:
> jakarta-tomcat/src/share/org/apache/jasper/compiler Compiler.java
>
>
> I agree with Craig.
>
> The ability to run JSP apps without any source JSPs must be maintained
> for app vendors who want to ship without source code. Not sure if this
> patch would interfere with that or not.
To deploy an app without the JSP source using Tomcat involves the following
steps (taken from Hans Bergsten's excellent O'Reilly book):
1) Compile the .jsp files into servlets
2) Copy the .class files into the apps WEB-INF/classes directory. The
filenames for the class files need to be altered to match the name of the
actual class included in them.
3) Edit the app's web.xml to map url-patterns for the JSPs into the
appropriate servlet class.
Step 3 is the key. Because we're mapping the urls directly to a servlet we
bypass Jasper completely. There is no timestamp checking, if the servlet
class doesn't exist no attempt will be made to translate a .jsp (you'll just
get a 500 error), etc.
Also note that deploying a WAR like this is not portable across JSP
containers (possibly even different version of the same container).
> A separate issue: if a user removes the source JSP, it may be OK to
> remove the JSP class file, but what about the class loaded in memory
> (assuming the server was running when the JSP was deleted)? To be
> consistent you would have to unload that JSP class, and possibly any
> associated objects (depending how JavaBeans and JSP are loaded in
> classloaders in Tomcat). For example, if an application scope bean were
> loaded by that JSP, would that bean be dumped with the classloader for
> that JSP or not?
Actually, the JSP servlet class will still be loaded it just won't ever be
executed. Any associated classes will remain in memory and any instances of
them will remain. Other pages that reference these classes will continue
work as expected.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]