[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Home]
RE: GNUJSP runtime error
Carsten,
Thank you, thank you, thank you! I solved my problem by moving the reference
to servlet-2.0-plus.jar from the engine properties file to the zone
properties file.
Now my engine properties file has the following lines:
wrapper.classpath=/path/to/classes.zip
wrapper.classpath=/path/to/jsdk.jar
wrapper.classpath=/path/to/jserv.jar
And my zone properties file has the following lines:
repositories=/path/to/servlet-2.0-plus.jar
repositories=/path/to/gnujsp.jar
Now everything works perfectly. Now to add SSL to the mix....
Regards,
.... Bob
-----Original Message-----
From: Carsten Heyl [mailto:heyl@nads.de]
Sent: Wednesday, May 17, 2000 4:02 AM
To: Bob Kimble
Cc: GNUJSP mailing list
Subject: Re: GNUJSP runtime error
Hi Bob,
I had the same problem but didn't had the time to really find
out what is happening.
It may have something to do with some classes which are shared being
loaded from wrapper.classpath and some from the repository classpath.
I solved my problems by moving all gnujsp and dependant stuff
to the repository.
>Help!
>
>I am having a problem with GNUJSP that has me stumped. I have two virtual
>hosts, say vhost1 and vhost2, that are configured identically so far as I
>can determine. Each one has its own servlet zone, and they are configured
>identically as well. I won't bore anyone with the details unless it becomes
>essential.
>
>Here is my problem. From an ApacheJServ perspective, both virtual hosts
>behave correctly. I say this because the requests for
>http://vhost1/servlets/IsItWorking and http://vhost2/servlets/IsItWorking
>behave as expected. My problem is with GNUJSP. The request for
>http://vhost1/hello.jsp returns what you would expect, but the same request
>for vhost2 returns this:
>
>Exception while servicing request for /hello.jsp:
>
>java.lang.ClassCastException: org.gjt.jsp.jsdk20.HttpServletRequestWrapper
> at org.gjt.jsp.PageContextImpl.getException(PageContextImpl.java:269)
> at org.gjt.jsp.PageContextImpl.initialize(PageContextImpl.java:112)
> at org.gjt.jsp.JspFactoryImpl.getPageContext(JspFactoryImpl.java:46)
> at jsp__hello_2ejsp._jspService(jsp__hello_2ejsp.java:29)
> at org.gjt.jsp.HttpJspPageImpl.service(HttpJspPageImpl.java:75)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
> at org.gjt.jsp.JspServlet$Page.process(JspServlet.java:640)
> at org.gjt.jsp.JspServlet.service(JspServlet.java:284)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
> at
>org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)
> at org.apache.jserv.JServConnection.run(JServConnection.java:188)
> at java.lang.Thread.run(Thread.java)
>
>Could someone please suggest what this error message means? It might shed
>some light on my problem. All the errors I get (like from date.jsp) point
to
>the same line:
>
>PageContext pageContext = factory.getPageContext (this,
> request,
> response,
> null,
> true,
> 8192,
> true);
>
>I should also point out that GNUJSP is compiling the pages correctly (I get
>essentially the same .java file for both virtual hosts) and the .class
files
>appear to be correctly generated. It's when the .class files are executed
>that I get the problem.
>
>In reality, I have four virtual hosts, and all but the first behave this
>way. It's driving me crazy. Thanks in advance for any help you might
>provide. What I'm really looking for is what that error message could mean,
>so that I might figure out where to look.
>
>.... Bob Kimble
>
>+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
=
>+=+=+=+=+=+=+
>
>For what it's worth, the generated page (jsp__hello_2ejsp.java) looks like
>this:
>
>/*
> Generated by JavaEmitter on Tue May 16 12:53:03 EDT 2000
> Please do not modify.
> */
>
>import java.io.IOException;
>import javax.servlet.*;
>import javax.servlet.http.*;
>import javax.servlet.jsp.*;
>
>public class jsp__hello_2ejsp extends org.gjt.jsp.HttpJspPageImpl{
>
> public final long _gnujspGetTimestamp() {
> return 958495983183L;
> }
> private static final String[] _gnujspDeps = new String[]
>{ "/hello.jsp" };
> public final String[] _gnujspGetDeps() {
> return _gnujspDeps;
> }
> public final long _gnujspGetCompilerVersion() {
> return 1999101701L;
> }
> public void _jspService (HttpServletRequest request,
> HttpServletResponse response)
> throws ServletException, IOException
> {
> response.setContentType ("text/html");
> JspFactory factory = JspFactory.getDefaultFactory ();
> PageContext pageContext = factory.getPageContext (this,
> request,
> response,
> null,
> true,
> 8192,
> true);
> HttpSession session = pageContext.getSession ();
> ServletContext application =
>pageContext.getServletConfig().getServletContext();
> JspWriter out = pageContext.getOut ();
> ServletConfig config = pageContext.getServletConfig();
> Object page = this;
>
> try {
>
>
>// line:/hello.jsp:1
>out.print ("<html>\n<body>\n\t<h1>The Famous JSP Hello Program</h1>\n\t");
>// line:/hello.jsp:4
> String s = "GNUJSP";
>
>// line:/hello.jsp:5
>out.print ("\nThe following line should contain the text \"Hello GNUJSP
>World!\".\n<br>If thats not the case start debugging ...\n<p>\nHello ");
>// line:/hello.jsp:8
>out.print ( s );
>
>// line:/hello.jsp:8
>out.print (" World!\n</body>\n</html>\n ");
> } catch (Exception e) {
> out.clearBuffer ();
> pageContext.handlePageException (e);
> } finally {
> out.close ();
> factory.releasePageContext (pageContext);
> }
>
> }
>
>}
>
>
>
>
Ciao,
Carsten Heyl
Carsten Heyl Heyl@NADS.De
NADS - Solutions on Nets http://www.nads.de/
NADS GmbH http://www.pixelboxx.de/
Hildebrandtstr. 4E Tel.: +49 211 933 02-90
D-40215 Duesseldorf Fax.: +49 211 933 02-93