You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Faine, Mark" <Ma...@msfc.nasa.gov> on 2005/04/12 16:58:23 UTC

include generated_web.xml into web.xml

I'd like to include my generated_web.xml file that was created by JSPC into
my applications web.xml file.  How can this be accomplished?
 
Thanks,
-Mark
 
 

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


Re: include generated_web.xml into web.xml

Posted by Tim Funk <fu...@joedog.org>.
In tomcat5
add addWebXmlMappings='true' to your jasper2 task.



In tomcat4 - you need a placeholder comment in the web.xml file. Then use ant 
to replace the contents.

For example:
<!-- Loaded your precompiled snippet into a property -->
<loadfile property="precompiled"
            srcFile="${build.dir}/WEB-INF/precompiled.xml"
           encoding="ISO-8859-1"/>

<!-- Now replace the xml with a predifined snippet -->
<replace file="${build.dir}/WEB-INF/web.xml" value="${precompiled}">
   <replacetoken><![CDATA[<!-- precompile include -->]]></replacetoken>
</replace>


-Tim

Faine, Mark wrote:

> I'd like to include my generated_web.xml file that was created by JSPC into
> my applications web.xml file.  How can this be accomplished?
> 

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