You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rob <bs...@insightoutsight.com.au> on 2003/06/08 18:21:28 UTC

precompiled jsp's as a part of application war file

I would like to bundle my application into a single .war file.
In addition I would like to include the precompiled .jsp files
in the war file as opposed to the .jsp files themselves.

Is there a way to do this?  I would like to deploy my
application to a target without a `javac`.

A description of how would be appreciated, particularly
where within my hierarchy I place the class files and how it
affects the requests for those .jsp files (ie can a person still
type in http://www.foo.com/myapp/my.jsp) or do they end up
being used as servlets instead?

Thanks

Rob


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: precompiled jsp's as a part of application war file

Posted by Bill Barker <wb...@wilshire.com>.
You have a bunch of servlet-mappings in your web.xml file that map that maps
the jsp URL to the pre-compiled class.  Jspc will generate these for you.

One gotcha with doing this is that TC 4.x won't find welcome-files (e.g.
index.jsp) unless there is an actual file with that name.  The file can be
empty, but it has to exist.

"Rob" <bs...@insightoutsight.com.au> wrote in message
news:3EE36288.30001@insightoutsight.com.au...
> I would like to bundle my application into a single .war file.
> In addition I would like to include the precompiled .jsp files
> in the war file as opposed to the .jsp files themselves.
>
> Is there a way to do this?  I would like to deploy my
> application to a target without a `javac`.
>
> A description of how would be appreciated, particularly
> where within my hierarchy I place the class files and how it
> affects the requests for those .jsp files (ie can a person still
> type in http://www.foo.com/myapp/my.jsp) or do they end up
> being used as servlets instead?
>
> Thanks
>
> Rob




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: precompiled jsp's as a part of application war file

Posted by Tim Funk <fu...@joedog.org>.
- Precompile your jsp's
- Precompiling also involves changing your web.xml to map jsp files to the 
compiled version of your class

Precompiling involves translating your jsp's to class files webapp build time 
(instead of run time) via jspc(?). The class files will reside in your 
WEB-INF/classes directory somewhere.

I have never done precompiling in 4.X (so I don't the actual tech 
instructions of how to do so)



-Tim

Rob wrote:
> I would like to bundle my application into a single .war file.
> In addition I would like to include the precompiled .jsp files
> in the war file as opposed to the .jsp files themselves.
> 
> Is there a way to do this?  I would like to deploy my
> application to a target without a `javac`.
> 
> A description of how would be appreciated, particularly
> where within my hierarchy I place the class files and how it
> affects the requests for those .jsp files (ie can a person still
> type in http://www.foo.com/myapp/my.jsp) or do they end up
> being used as servlets instead?
> 
> Thanks
> 
> Rob
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org