tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: Problem with including JspC generated web.xml fragment
Date Mon, 17 Jan 2005 16:33:12 GMT
Odd, I do not have this problem.

Make sure you are building to a scratchpad. This means your web.xml is copied 
to a new location before you precompile. Then JSPC can edit it in place and 
you no not lose any of your changes.

To get around the relative pathing issue - prefix your build with ${basedir}. 
For example:
<jasper2 compile="true"


Andreas Schildbach wrote:

> Hello everyone,
> I've got a bit of a problem precompiling JSPs for Tomcat 5.0. To be 
> exact, the problem is the web.xml fragment that is generated by JspC 
> containing the servlet and servlet-mapping elements.
> That fragment has to be included in the web.xml file somehow. Of course, 
> I don't want to do this manually after each precompile. What's the best 
> way to include the fragment automatically?
> If I use the XML entity inclusion mechanism, I run into some problems. 
> First, if I enter statements into my original web.xml, the XML parser 
> also wants to include when JspC tries to open the file (at this point 
> obviously the generated file is not yet present). The second problem is 
> that the path of the included file seems to be relative to the current 
> directory - not relative to the including XML file.
> What are the alternatives?
> Personally, I'd prefer to use a transparent process. First, the web-app 
> is assembled using no precompilation. It should be fully functional at 
> this point (for development and testing), which means that there can't 
> be any tokens or inclusion instructions in web.xml. In a second step, 
> the web-application should be transformed to an application with all 
> JSPs precompiled, with all descriptor modifications that are needed. It 
> would be perfect if in this state the application would still be fully 
> independant of Tomcat.
> Any help, any thoughts? Thanks a lot!
> Regards,
> Andreas
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message