File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Where do I find JspC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Where do I find JspC" Watch "Where do I find JspC" New topic

Where do I find JspC

James Ellis
Ranch Hand

Joined: Oct 14, 2004
Posts: 205
So I am trying to precompile my JSP's for Tomcat 4.1.31 using the following task in Ant.


<include name="**/*.jsp" />

Unfortunately I keep getting an error message

"java.lang.NoClassDefFoundError: org/apache/jasper/JspC"

What jar file is supposed to contain this class? I've looked around and can't seem to find it.
Ed Moon

Joined: Oct 18, 2004
Posts: 3
You need jasper.jar & jasper-runtime.jar from your Tomcat 4.X install.

Copy these files into your ANT_HOME/lib directory and you should not get than error any more.
James Ellis
Ranch Hand

Joined: Oct 14, 2004
Posts: 205
So I can succussfully compile the jsp's, but when i put the compiled JSP's into the work/Standalone/localhost/<webapp>/jsp/login directory, I get the following error

javax.servlet.ServletException: org/apache/jsp/login_project_jsp (wrong name: jsp/login/login_project_jsp)

If I go to the actual jsp file and do "touch login.jsp" it will then recompile the login_jsp.class file and everything works. But how do you deploy the actual jsp class files so they are picked up by the server as the "latest" copy of the jsp without forcing the jsp to be recompiled.

I agree. Here's the link:
subject: Where do I find JspC
It's not a secret anymore!