Hi.
disclaimer.. if this is too complicated, please tell me how to express
the problem more simply.
thanks
I have installed tomcat 5.5 (the latest I believe) on windows xp sp2
home edition.
I'm trying out the tutorial at:
http://java.sun.com/developer/technicalArticles/javaserverpages/JSP20/index.html
When I enter the url:
http://localhost/jsp-examples/jsp2-tutorial/form.jsp?name=xx
It works fine (it displays a form.jsp which is in:
D:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\jsp-examples\jsp2-tutorial
But when I try to enter the url:
http://localhost/jsp-examples/jsp2-tutorial/math.jsp
I get http status 500 with this exception:
exception
org.apache.jasper.JasperException: The absolute uri:
http://jakarta.apache.org/tomcat/jsp2-example-taglib %>
(The complete error screen is at the bottom.)
I imagine that the error shows it is trying to serve up the math.jsp
file, so it is finding that math.jsp file.
The error component:
<FORM action= cannot be resolved in either web.xml or the jar files
deployed with this application
is telling me it can't make sense of this in the jsp:
<FORM action="\jsp-examples\jsp2-tutorial/math.jsp" method="GET">
Can someone help me understand how to analyze this error?
It is trying to display some fields and add them when the button is
clicked, however I can't figure out the malfunction.
I'm not even getting a box, or a butotn or anything,
I tried changing the jsp to read this, but it still threw an error
saying it could not load the class for the jsp:
<%@ taglib prefix="my"
uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib %>
<HEAD>
<TITLE>Functions</TITLE>
</HEAD>
<BODY>
<H3>Add Numbers</H3>
<P>
</BODY>
</HTML>
So I'm guessing that is the root of the original problem. So, the
class must not be in the correct place I think. mmmm
I assume it is talking about this class:
package jsp2.examples.el;
import java.util.*;
public class Compute{...}
Now I put Compute.java in:
D:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\jsp-examples\WEB-INF\classes\jsp2\examples\el
and then went to here:
D:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\jsp-examples\WEB-INF\classes>
and compiled it with:
javac jsp2\examples\el\Compute.java
and the class file is in the directory with the java class.
Can someone tell me what is wrong here, and if I"m
analyzing/approaching the problem correctly? I'm trying to tie all
this taglib stuff together.
is el very commen (expression language) these days?
Thanks
Jeff
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
org.apache.jasper.JasperException: The absolute uri:
http://jakarta.apache.org/tomcat/jsp2-example-taglib %>
<HEAD>
<TITLE>Functions</TITLE>
</HEAD>
<BODY>
<H3>Add Numbers</H3>
<P>
<FORM action= cannot be resolved in either web.xml or the jar files
deployed with this application
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.apache.jasper.JasperException: The absolute uri:
http://jakarta.apache.org/tomcat/jsp2-example-taglib %>
<HEAD>
<TITLE>Functions</TITLE>
</HEAD>
<BODY>
<H3>Add Numbers</H3>
<P>
<FORM action= cannot be resolved in either web.xml or the jar files
deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.17 logs.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.17
> <FORM action="\jsp-examples\jsp2-tutorial/math.jsp" method="GET">
Dont use '\' here.
Jeff Kish - 14 Jun 2006 13:42 GMT
>> <FORM action="\jsp-examples\jsp2-tutorial/math.jsp" method="GET">
>Dont use '\' here.
Thanks.. I'll try when I get home tonight.. you mean use this instead?
jsp-examples.jsp2-tutorial.math.jsp ? or what exatly?
I basically copied from the tutorial, so I appreciate the clarification, and
maybe a 'why'.
Warm Regards!
Jeff Kish
Jeff Kish - 15 Jun 2006 00:03 GMT
>> <FORM action="\jsp-examples\jsp2-tutorial/math.jsp" method="GET">
>Dont use '\' here.
I tried this with no luck:
<FORM action="/jsp-examples/jsp2-tutorial/math.jsp" method="GET">
Any other pointers? thanks
Jeff Kish <kishjjrjj@charter.net> said:
>http://java.sun.com/developer/technicalArticles/javaserverpages/JSP20/index.html
>http://localhost/jsp-examples/jsp2-tutorial/math.jsp
>
[quoted text clipped - 15 lines]
><FORM action= cannot be resolved in either web.xml or the jar files
>deployed with this application
Ok. It tries to handle all of the above as an URL (ok, URI),
whereas apparently only the
http://jakarta.apache.org/tomcat/jsp2-example-taglib
should be an URI.
Looking at the math.jsp source code, they're missing the double quote
from the end of the URI - so instead of
<%@ taglib prefix="my"
uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib %>
there should be
<%@ taglib prefix="my"
uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib" %>
... hopefully that was all.

Signature
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
Jeff Kish - 15 Jun 2006 22:37 GMT
>Jeff Kish <kishjjrjj@charter.net> said:
>>http://java.sun.com/developer/technicalArticles/javaserverpages/JSP20/index.html
[quoted text clipped - 36 lines]
>
>... hopefully that was all.
yes, it worked fine after I added the double quote.
Thanks so much.
I guess it was a matter of just looking very carefully at the error
message, and having a bit of experience, right?
Regards! (and thanks so much)