Re: JasperException: Unable to compile class for JSP
Put it in a package ... http://jakarta.apache.org/tomcat/faq/classnotfound.html -Tim Goo GGooo wrote: On 10/4/05, Wendy Smoak wrote: From: Goo GGooo [EMAIL PROTECTED] An error occurred at line: 1 in the jsp file: /name.jsp Generated servlet error: UserData cannot be resolved or is not a type === Files webapps/tut/name.jsp and webapps/tut/WEB-INF/classes/UserData.java are attached. Try putting UserData in a package. That works, cool! What's the reason for that? Can I make it running without packages? (just interested, not that I'm unhappy with having it in a package :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JasperException: Unable to compile class for JSP
On 10/4/05, Wendy Smoak wrote: From: Goo GGooo [EMAIL PROTECTED] An error occurred at line: 1 in the jsp file: /name.jsp Generated servlet error: UserData cannot be resolved or is not a type === Files webapps/tut/name.jsp and webapps/tut/WEB-INF/classes/UserData.java are attached. Try putting UserData in a package. That works, cool! What's the reason for that? Can I make it running without packages? (just interested, not that I'm unhappy with having it in a package :-) Thanks Goo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JasperException: Unable to compile class for JSP
Thank you for your reply. I am using Tomcat 4.0.4 with JDK 1.3.1. They were both clean installs. Does Tomcat 4.0.4 have any issues with this JDK? Should I upgrade to JDK 1.4? I will look into this further. Kyle -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 11:50 PM To: Tomcat Users List Subject: AW: JasperException: Unable to compile class for JSP Your error message sounds as if pageContext.handlePageException() is is defined to accept just an Instance of Exception not Throwable. That could be caused be a jar file that contains an older version of the jsdk. (servlet.jar, ...) Have a look at your jar files that are used for your tomcat. (Don't forget {JAVA_HOME}\jre\lib\ext !) - Which Version of tomcat do you use ? -Ursprüngliche Nachricht- Von: Pearsall, Kyle [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 20. Juni 2002 02:00 An: Tomcat (E-mail) Betreff: JasperException: Unable to compile class for JSP Now I get a different problem. The jsp files can't compile correctly at runtime. This code works properly on Weblogic 5.1. Do I need to fix something in Tomcat? Any suggestions? org.apache.jasper.JasperException: Unable to compile class for JSP D:\TOMCAT\work\Standalone\localhost\dhimaging\jsp\Albums$jsp.j ava:689: Incompatible type for method. Explicit cast needed to convert java.lang.Throwable to java.lang.Exception. if (pageContext != null) pageContext.handlePageException(t); ^ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JasperException: Unable to compile class for JSP
I'm not convinced yet that I've done everything I can with Tomcat yet to get my JSPs to work properly. The error below (and others like it from different JSP pages) don't appear in other web servers, such as Weblogic 5.1. The same JSPs compile properly on these other web servers. I've made no modifications to the code. I'm sure numerous exceptions will appear over many JSP pages on Tomcat as it is now. What I am wondering is whether there may be a way to customize tomcat with a different JSP compiler. I do admit I am a newbie at this...there is alot to Tomcat and JSP I don't understand yet. Your help is most appreciated. Thank you, Kyle P. -Original Message- From: Andrew Conrad [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 19, 2002 5:27 PM To: 'Tomcat Users List' Subject: RE: JasperException: Unable to compile class for JSP I think your answer is right in the output: Incompatible type for method. Explicit cast needed to convert java.lang.Throwable to java.lang.Exception instead of: -- if (pageContext != null) pageContext.handlePageException(t); -- Try this: -- if (pageContext != null) pageContext.handlePageException((Exception) t); -- -Andrew Conrad -Original Message- From: Pearsall, Kyle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 19, 2002 8:00 PM To: Tomcat (E-mail) Subject: JasperException: Unable to compile class for JSP Thank you for the help with Tomcat and SQL server 2000. Now I get a different problem. The jsp files can't compile correctly at runtime. This code works properly on Weblogic 5.1. Do I need to fix something in Tomcat? Any suggestions? Thank you, Kyle P. org.apache.jasper.JasperException: Unable to compile class for JSP D:\TOMCAT\work\Standalone\localhost\dhimaging\jsp\Albums$jsp.java:689: Incompatible type for method. Explicit cast needed to convert java.lang.Throwable to java.lang.Exception. if (pageContext != null) pageContext.handlePageException(t); ^ 1 error -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]