I was messing around with the code a little bit, and tried this:
JspC antTask = new JspC(); antTask.setArgs(new String[] { "-compile", uploadTileFilePath }); antTask.execute();
but this always gave me an error that javax.servlet package could not be found.
Replying to myself here - but I got a bit further with this and need more support if anybody has any ideas.
I thought at first that this code would parse/compile the uploaded JSP page using the same paths/classpath/etc. that the Jasper servlet setup in web.xml uses.
It turns out I am wrong and it seems like it is using some sort of default for the classpath and output directory.
The classpath just has the classes from the jars for my local site (hence no tomcat jars and there error being seen above.
It is outputting the jsp file to a .java file under <TOMCAT_HOME>\org\apache\jsp\WEB_INF\tiles\public_\file_jsp.java (and presumably if I could get compilation to work it would compile to that directory as well.)
So it looks like I need to send in classpath and destination directory configuration stuff to the JspC task (using setClassPath and setOutputDir on antTask I think)
Where do I get the proper information from though? (The proper information to me means the same classpath and output directory that tomcats jasper servlet uses) Is there a way to read the jasper servlets configuration variables in my serlvet? Of can I figure it out from the JspC(and related) source code? I haven't seen anything helpful there yet.
Thanks,
Matt
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
