Hi, I am using JBoss 3.2.4RC1 that now uses Tomcat 5.0 as the default. When I precompile JSP using the Jasper JSP compiler that comes with Tomcat 5.0 (jasper-compile.jar, jasper-runtime.jar), I receive the following error about an unrecognized switch. jspc: [jspc] Compiling 12 source files to /output [jasperc] error:org.apache.jasper.JasperException: Unrecognized option: -v0. Use -help for help. [jasperc] at org.apache.jasper.JspC.setArgs(JspC.java:307) [jasperc] at org.apache.jasper.JspC.main(JspC.java:231) Apparently, Jasper 5.0 does not accept -v0 as an argument (It does support -v, however), and JspC sets '-v0' argument by default (and no way to turn it off). I tried setting 'compiler' to 'jasper50' but JspC does not seem to recognize it. I can move back to compile my JSP using Jasper41, but the compiled servlet blows up (method-not-found-exception) when running on Tomcat 5.0. Thanks, -- Rick
The tomcat team now ship their own <jspc> task, and changed the command line options at the same time, which is why the Ant bundled one breaks. I am afraid you are going to have to move to the version of jspc that ships with tomcat5.0. It may be inconvenient migrating, but you then get the benefit of a task that is in sync with all the dependent binaries in tomcat, maintainers who understand jasperc, etc, etc. marking as wontfix, sorry.
*** Bug 28090 has been marked as a duplicate of this bug. ***
*** Bug 28223 has been marked as a duplicate of this bug. ***
Go ahead and close. LiteWebserver3 compiles JSP files on the fly without restarting the server and requires no special setup or complex build.xml files. Does not require ANT. IT JUST WORKS!
I fail to see how LiteWebserver3 solves a Tomcat 5 problem. Jasper can certainly compile JSPs on the fly, that's not the point of this task. Sometimes you will want to know that your JSP is broken before you deploy it, sometimes you don't want to have the original JSPs on your production server at all. There are several reasons for a <jspc> task.
I have spent countless hours trying to get Tomcat 5.0 to compile a JSP file. It does not compile or even attempt to compile. No log errors generated. Have gone through all TOMCAT/ANT Documentation to get tomcat to compile JSP's with no luck. Have also found that many other developers have experienced the same problem. Have contacte Tomcat forum and have received no response except RTFM. Been there... Done that... got the T-Shirt! Besides I don't appreciate the nasty responses I receive from the forum.
Jeff, I understand your frustration, even if my experience may be different. I haven't used Tomcat-5 myself, all I can say is that neither Tomcat-3 nor Tomcat-4 ever needed any special configuration to compile JSPs, it simply worked. I'm not sure what may be different for you, but then again I'm not a Tomcat expert - this is an Ant bug report, after all.
I used Tomcat 4 and had no problem. With Tomcat 5 you have to setup a complete build.xml file with each step to perform (JSPC then JAVAC) using ant and compile manually. I've tried the startup option to compile jsp's when Tomcat starts with no luck. I was unable to compile using ANT which has the -v0 error. I've tried JSPC but Tomcat doesn't ship with Jspc.exe or Jspc.bat so that doesn't work. I've tried everything. I've used Tomcat for years so I'm sorry to change.
Well, if we really want to keep Ant's JSPC task alive, all we currently need to do is kill the -v0 option for less verbosity. But the tomcat developers have hinted there may be some more surprises. In that case, we could define a new adapter for TC5.x that does the right thing, sharing as much code as we can from the 4.2 implementation.
This sounds good. I would like to keep the ANT request open. I still have hope for it.
*** Bug 28439 has been marked as a duplicate of this bug. ***
*** Bug 29513 has been marked as a duplicate of this bug. ***
I just discovered there is an even older bugrep about this. *** This bug has been marked as a duplicate of 25345 ***