Woodchuck, That works unless you use something like StrutsTestCase which expects to see a value web.xml file in the source code tree (before building the WAR file). I assume that @REPLACE_WITH_WEB_FRAGMENT_HERE@ is in a place that makes your web.xml XML invalid.
I used a regular expression filter to do the same thing. Thanks again for all of your help. --Marty --- Woodchuck <[EMAIL PROTECTED]> wrote: > the beauty and arguably ugliness of ant (Yet Another Duality Of Life) > is that there are many ways to do the same thing. i simply use ant's > <loadfile> and <replace> tasks. > > <loadfile> to load the web fragment file. > > <replace> to replace the token i created in my web.xml with the entire > contents of the web fragment. > > for example: > <loadfile srcfile="jspwebfrag" property="jsp_mappings"/> > > <replace file="web.xml" token="REPLACE_WITH_WEB_FRAGMENT_HERE" > value="${jsp_mappings}"/> > > > i just had to make sure my token was in the correct place in my web.xml > file > > hth, > woodchuck > > > --- Martin Wegner <[EMAIL PROTECTED]> wrote: > > > Woodchuck, > > > > Thanks for the advice. Glad to hear someone has followed the road > > before > > me. > > > > I found this useful link as well: > > > > http://www.artima.com/forums/flat.jsp?forum=121&thread=19915 > > > > Question: how do you handle the importing of the fragment into your > > web.xml? Are you using <copy> and <filterset> in Ant? If so, how do > > you > > put in your filterset token such that you still have a valid web.xml? > > > > Thanks. > > > > > > --Marty > > > > --- Woodchuck <[EMAIL PROTECTED]> wrote: > > > > > i ran into the same problem as well. > > > > > > what i can tell you is that because jspc generates different import > > > statements than tomcat, this is the reason why the generated > > web.xml > > > fragment is useful. this fragment basically maps the pre-compiled > > jsps > > > so that it when the jsp is requested your app will know where to > > look > > > for the jsp class. > > > > > > i have tried to get jspc to produce the same import statements as > > > tomcat does but i gave up after a while of unsuccessful attempts. > > > > > > in the end, i simply used the web.xml fragment and it works fine. > > and > > > a positive side effect to this is that you don't need to include > > the > > > actual jsps at all. you can deploy war files that can be > > completely > > > free of jsp files, so your war file is smaller and your client > > never > > > sees any jsp source. > > > > > > woodchuck > > > > > > > > > --- Martin Wegner <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > I have been looking into using the jspc ant task to pre-compile > > our > > > > Struts-based application. In comparing the Java code generated > > by > > > > the > > > > jspc task and the Java code generated by Tomcat 4.1.x there are > > some > > > > differences, in particular the package names. Also, jspc wants > > to > > > > generate the fraction of web.xml for listing the servlets, which > > > > doesn't > > > > make sense to me in a Struts application. > > > > > > > > Is there any advice posted out there about pre-compiling > > Struts-based > > > > applications? Am I completely wrapped around the axle on this? > > > > > > > > Thanks. > > > > > > > > > > > > --Marty > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > __________________________________ > > > Do you Yahoo!? > > > Yahoo! Mail - Find what you need with new enhanced search. > > > http://info.mail.yahoo.com/mail_250 > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > __________________________________ > Do you Yahoo!? > Read only the mail you want - Yahoo! Mail SpamGuard. > http://promotions.yahoo.com/new_mail > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]