tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Fincher" <...@tbird.com>
Subject Re: STATUS 500 - Unable to compile class for JSPNote
Date Thu, 30 May 2002 19:21:59 GMT
I've had the same problem and the code works fine on Tomcat 3.x but the
JSP's won't compile under 4.x. The tags are in a tag library jar called
jtl.jar.  You don't need a tld directory if you use a jar.  According to the
JSP 1.1 spec it is assumed that the tld will be in a file called taglib.tld
inside the META-INF folder inside the jar.  I think the problem has to do
with the differences in servlet 2.3 vs 2.2 and differences in the way
taglibs are handled in JSP 1.2 as opposed to 1.1.

It works in Tomcat 3.x because it is servlet 2.2 JSP 1.1 and Tomcat 4.x is
servlet 2.3 JSP 1.2.  The Sun tld was poorly formed in the JavaMail demo.
Not surprising since the taglib entries in web.xml were not in the right
order either.

Fortunately, the demo has the source of the taglib and you can fix the tld.

You should not have to explicitly import the taglib, that's what the tld is
for.

Rick
----- Original Message -----
From: "Phillip Morelock" <subscriptions@phillipmorelock.com>
Subject: Re: STATUS 500 - Unable to compile class for JSPNote


> import the class by making this the top line in your jsp:
>
> <%@ page language="java" contentType="text/html" import="ListMessagesTag"
%>
>
> The real answer is that you should take some time to learn about packages
> and jars, but for just getting started, etc., the above *should* fix your
> current problem.  Tomcat is looking for your class in its default JSP
> package scope, org.apache.jsp.* .  Explicitly importing the class gets
> around this.
>
> To learn about packages:
> http://java.sun.com/docs/books/tutorial/java/interpack/packages.html
>
> To learn about jars:
> http://java.sun.com/docs/books/tutorial/jar/
>
> cheers and have fun,
> fillup
>
>
> On 5/29/02 10:04 PM, "Trenton D. Adams" <trent.nospam@telusplanet.net>
> wrote:
>
> > I get the following error and I have no idea how to fix it.  I'm
> > attempting to get the javamail IMAP example going, but it doesn't want
> > to work.  I've had to modify several files and it still won't work.
> >
> > I understand that this has to do with a program that has nothing to do
> > with tomcat, but I don't understand the errors below.  So, I was hoping
> > the TomCat Developers could help! :)
> >
> > Now the funny thing is that I don't have a class that correspond to
> > org.apache.jsp.ListMessagesTag.  I do have a ListMessagesTag class, but
> > not org.apache.jsp.ListMessagesTag.
> >
> > After the error is messageheaders.jsp from line 65 to 98.
> >
> >
> > Misc Details
> > JDK1.4.0 final
> > Tomcat 4.0.3
> >
> >
> >
> > Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
> > ------------------------------------------------------------------------
> > --------
> > type Exception report
> > message Internal Server Error
> > description The server encountered an internal error (Internal Server
> > Error) that prevented it from fulfilling this request.
> > exception
> > org.apache.jasper.JasperException: Unable to compile class for JSPNote:
> > sun.tools.javac.Main has been deprecated.
> >
> > An error occurred between lines: 65 and 67 in the jsp file:
> > /messageheaders.jsp
> > Generated servlet error:
> > C:\jakarta-tomcat-4.0.3\work\localhost\javamail\messageheaders$jsp.java:
> > 72: Class org.apache.jsp.ListMessagesTag not found.
> >               ListMessagesTag _jspx_th_javamail_listmessages_0 = new
> > ListMessagesTag();
> >               ^
> >
> > An error occurred between lines: 65 and 67 in the jsp file:
> > /messageheaders.jsp
> > Generated servlet error:
> > C:\jakarta-tomcat-4.0.3\work\localhost\javamail\messageheaders$jsp.java:
> > 72: Class org.apache.jsp.ListMessagesTag not found.
> >               ListMessagesTag _jspx_th_javamail_listmessages_0 = new
> > ListMessagesTag();
> >                                                                      ^
> >
> > An error occurred between lines: 65 and 67 in the jsp file:
> > /messageheaders.jsp
> > Generated servlet error:
> > C:\jakarta-tomcat-4.0.3\work\localhost\javamail\messageheaders$jsp.java:
> > 87: Class org.apache.jsp.MessageInfo not found.
> >                             MessageInfo msginfo = null;
> >                             ^
> >
> > An error occurred between lines: 65 and 67 in the jsp file:
> > /messageheaders.jsp
> > Generated servlet error:
> > C:\jakarta-tomcat-4.0.3\work\localhost\javamail\messageheaders$jsp.java:
> > 88: Class org.apache.jsp.MessageInfo not found.
> >                             msginfo = (MessageInfo)
> > pageContext.findAttribute("msginfo");
> >                                        ^
> >
> > An error occurred at line: 83 in the jsp file: /messageheaders.jsp
> > Generated servlet error:
> > C:\jakarta-tomcat-4.0.3\work\localhost\javamail\messageheaders$jsp.java:
> > 131: Variable msginfo may not have been initialized.
> >                             out.print( msginfo.getDate() );
> >                                        ^
> > 5 errors, 1 warning
> >
> > at
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
> > at
> > org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
> > at
> > org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(J
> > spServlet.java:177)
> > at
> > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
> > t.java:189)
> > at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
> > at
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
> > her.java:683)
> > at
> > org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
> > atcher.java:431)
> > at
> > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
> > cher.java:355)
> > at FilterServlet.doGet(FilterServlet.java:85)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> > tionFilterChain.java:247)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> > erChain.java:193)
> > at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> > e.java:243)
> > at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
> > va:566)
> > at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> > 72)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> > e.java:190)
> > at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
> > va:566)
> > at
> > org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
> > va:246)
> > at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
> > va:564)
> > at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> > 72)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234
> > 3)
> > at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> > :180)
> > at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
> > va:566)
> > at
> > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> > lve.java:170)
> > at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
> > va:564)
> > at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> > :170)
> > at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
> > va:564)
> > at
> > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468
> > )
> > at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
> > va:564)
> > at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> > 72)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> > java:174)
> > at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
> > va:566)
> > at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> > 72)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> > org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.j
> > ava:1012)
> > at
> > org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:
> > 1107)
> > at java.lang.Thread.run(Thread.java:536)
> >
> > ------------------------------------------------------------------------
> > --------
> >
> >
> >
> > messageheaders.jsp lines 65-98
> >
> > <javamail:listmessages
> > id="msginfo"
> > folder="folder">
> > <%-- from --%>
> > <tr valign=middle>
> > <td width="25%" bgcolor="ffffff">
> > <font face="Arial,Helvetica">
> > <% if (msginfo.hasFrom()) { %>
> > <%= msginfo.getFrom() %>
> > </font>
> > <% } else { %>
> > <font face="Arial,Helvetica,sans-serif">
> > Unknown
> > <% } %>
> > </font></td>
> > <%-- date --%>
> > <td nowrap width="15%" bgcolor="ffffff">
> > <font face="Arial,Helvetica">
> > <%= msginfo.getDate() %>
> > </font></td>
> > <%-- subject & link --%>
> > <td bgcolor="ffffff">
> > <font face="Arial,Helvetica">
> > <a href="messagecontent?message=<%= msginfo.getNum() %>">
> > <% if (msginfo.hasSubject()) { %>
> > <%=    msginfo.getSubject() %>
> > <% } else { %>
> > <i>No Subject</i>
> > <% } %>
> > </a>
> > </font></td>
> > </tr>
> > </javamail:listmessages>
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message