• Post Reply Bookmark Topic Watch Topic
  • New Topic

Precompiling JSP using org.apache.jasper.JspC and configuring XML  RSS feed

 
Kevin Weslowski
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I've recently tried using the Jasper JspC to try to pre-compile my
JSPs. Either there's not enough documentation or I'm not experienced
enough in JSP/Servlet Technology...I was hoping someone could help me
with the steps...here's what I do so far:
I run the following command from the directory where all my jsps are
located:
java org.apache.jasper.JspC -webxml test.xml -webapp .
This creates the .java source files in the same directory. I put the
contents of test.xml into my web.xml. Then I use the java compiler
to compile the .java source files:
javac *.java
After I get the .class files, I'm lost as to what to do with them.
I get an Unknown Servlet class error message when I try to call one
of the precompiled JSPs.
Thanks in advance,
Kevin
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
they need to go in the WEB-INF/classes directory (i.e. on the classpath) so that your server can find them. Also, it might be worth checking that the server will not try and recompile the jsps anyway
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!