tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trenton D. Adams" <trent.nos...@telusplanet.net>
Subject RE: STATUS 500 - Unable to compile class for JSPNote
Date Thu, 30 May 2002 17:00:54 GMT
Thanks for the info.

I did have it in "WEB-INF/lib/jtl.jar" before, but it does the same
thing.

I have added that tag you gave me, and that fixed the problem.  I don't
understand why though.  I thought that...

<%@ taglib uri="/WEB-INF/tlds/taglib.tld" 
    prefix="javamail" %>

...was enough?

Do I also require...?
  <taglib>
    <taglib-uri>/WEB-INF/tlds/taglib.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/jtl.jar</taglib-location>
  </taglib>

The above taglib doesn't look right to me, but I can't put my finger on
it.  I'm new to this sort of thing so please go easy on me! :)

I get the following error on the Tomcat console when I add the <taglib>
above...

PARSE error at line 1 column 1
org.xml.sax.SAXParseException: The markup in the document preceding the
root element must be well-formed.


I do use packages/jars/wars.

-----Original Message-----
From: Phillip Morelock [mailto:subscriptions@phillipmorelock.com] 
Sent: May 29, 2002 11:24 PM
To: Tomcat Users List
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.jav
> a:
> 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