Correct on all counts, of course. Jspc could use some major tweaking, but it would be hard getting things right for all the various jspc runtime formats and packages and so forth; I think there will always be a DIY klude component to it. Equally useful to me would be an option where Jasper would precompile all the JSPs during startup...anybody happen to know if that's in the works?
-----Original Message----- From: Rod Macpherson [mailto:[EMAIL PROTECTED] Sent: Sat 3/1/2003 10:56 PM To: Ant Users List Cc: Subject: Re: JspC "supporting multi-directory jsps requires a bit more work to get it right" I would say the kludge is ant's jspc task; not your use of jspc and javac. As for not working with a "multi-directory" (read: pretty much any commercially viable web application) structure, are you sure that works at all? The new JspC seems to not deal with that at all. You have to compile each directory individually and assume all sorts of things about package names based on the target appserver. BTW, here's a good hint for JSPs: don't use a jsp extension on included JSPs. That way they do not get compiled 'sept when explicitly included. ----- Original Message ----- From: "Craig Berry" <[EMAIL PROTECTED]> To: "Ant Users List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, March 01, 2003 5:27 PM Subject: RE: JspC > This is a bit of a kludge, but it works (under Tomcat, at least). I looked around to find the directory where Tomcat's Jasper engine was storing jsp-generated .java and .class files. Having built them in my build tree using jspc and javac, I then just copied them over to the "right" place under the deploy tree, and it all works fine. You have to be careful to order the deployment so that the deployed jsp files are done first, and hence end up with a (very slightly) early timestamp than the derived java and class files. > > Note that Tomcat/Jasper uses an odd directory naming convention for where generated jsp files get stored, so supporting multi-directory jsps requires a bit more work to get it right. > > -----Original Message----- > From: Matthew Oatham [mailto:[EMAIL PROTECTED] > Sent: Sat 3/1/2003 7:48 AM > To: [EMAIL PROTECTED] > Cc: > Subject: Re: JspC > > > > Ok, thanks I read that part of the documentation, so what do I do with the > class files that are generated? put the in a jar in the lib directory or > stick them all in the classes directory? How do I call the from the webpage? > Do #i have to edit the web.xml file in any way? > > Thanks. > > > > > > > From: "Martin" <[EMAIL PROTECTED]> > Reply-To: "Ant Users List" <[EMAIL PROTECTED]> > To: "Ant Users List" <[EMAIL PROTECTED]> > Subject: Re: JspC > Date: Sat, 1 Mar 2003 08:33:32 -0700 > > Matthew > the doc states that " The jspc task does basic dependency checking to > prevent unnecessary recompilation -this checking compares source and > destination timestamps, and does not factor in class or taglib dependencies, > or <jsp:include> references." > > So if your java files are uptodate the jspc task will be bypassed..(and the > next task (usually javac) is executed) > > If you want to build an entire webapp the doc states: > > "webapp > Instructions to jasper to build an entire web application. The base > directory must have a WEB-INF subdirectory beneath it. When used, the task > hands off all dependency checking to the compiler. Attribute Description > Required > basedir the base directory of the web application Yes > " > > Does this help? > -Martin > > ----- Original Message ----- > From: "Matthew Oatham" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, March 01, 2003 7:16 AM > Subject: JspC > > > Hi, > > I am currently trying to figure out how to use the ant jspc task to > pre-compile my jsps. The task runs through fine but now what? I am left with > the java code for the generated sservlets but how do I deploy these? Do I > remove all the source .jsp files and replace them with the .java files? Also > jsp's that were originally stored in various directory structures now appear > all in the same directory specified as my destination. Is this correct > behaviour? Also how so I edit my web.xml file to include the servlet > references? > > Basically has anyone come across any good resources for this kind of task, I > mean the whole process of deploying pre compiled jsp's not just using the > ant task coz I think I have cracked that part! > > Thanks. > > Matt > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > _________________________________________________________________ > Express yourself with cool emoticons http://messenger.msn.co.uk > > > --------------------------------------------------------------------- > 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]