aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Where do I find JspC" Watch "Where do I find JspC" New topic
Author

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.

<jspc
destdir="${build_linux}/jsp_source"
verbose="1"
srcdir="C:\Jeb\root\webapps\jeb\jsp\standard"
compiler="jasper41">

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

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
Greenhorn

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.

Jim
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Where do I find JspC