Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forwarding to a servlet in GNUJSP

 
Bob Baker
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I posted this message in the GNUJSP mailing list, but got tired of receiving virus-infected messages rather than responses. Here goes:
I have a simple JSP startup page (index.jsp) that forwards to a servet:
<%@ page contentType="text/html;charset=WINDOWS-1252"%><%@ page session="true" %><% pageContext.forward("/js.cimba/ForumsServlet?command=main");%>
where "js.cimba" is the servlet zone provided by my hosting service. This code fine when run under the JDeveloper environment, but it looks like GNUJSP is actually trying to *COMPILE* it rather than passing it on to JServ when I run it on my local server. Is this not supported in GNUJSP 1.0.1, or do I have something misconfigured?
I am using Apache 1.3, JServ 1.1.2, JSSI 1.1.2, and GNUJSP 1.0.1 on a Windows XP Professional box.
Here's my error message log:
[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: service started[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: PathInfo ='/forums/index.jsp'[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: RequestURI ='/forums/index.jsp'[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: ServletPath ='/js.cimba/gnujsp'[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:pathdebug.getPageForURI: uri=/forums/index.jsp[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:pathdebug.getPageForURI: key=/forums/index.jsp[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: Depends onfile:/c:\documents and settings\robert\application data\website\www\forums\index.jsp[07/05/2002 18:48:21 EDT] gnujsp/jsp__forums__index_2ejsp: init[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: compileTime was1024363318000[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: file:/c:\documentsand settings\robert\application data\web site\www\forums\index.jsp timestamp1024363318000[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:pathdebug.getPageForURI: uri=/forums/ForumsServlet[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:pathdebug.getPageForURI: key=/forums/ForumsServlet[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: getResourceImpl:pathdebug.path : '/forums/ForumsServlet'[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: getResourceImpl:pathDebug.includePath: null[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: pathdebug.jsdk20: yes[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: pathdebug.pagebase: null[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:pathdebug.getRealPath: null[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:pathdebug.getPathTran: '/c:/documents and settings/robert/applicationdata/web site/www/forums/ForumsServlet'[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: pathdebug.getReqURI: '/forums/ForumsServlet'[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:pathdebug.getPathInfo: '/forums/ForumsServlet'[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet:pathdebug.getServPath: '/js.cimba/gnujsp'[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: getResIm: returnfile:/c:/documents and settings/robert/application data/website/www/forums/ForumsServlet[07/05/2002 18:48:21 EDT] gnujsp/org.gjt.jsp.JspServlet: Parsingfile:/c:/documents and settings/robert/application data/website/www/forums/ForumsServlet[07/05/2002 18:48:21 EDT] gnujsp/java.lang.ClassFormatError: Wrong nameat java.lang.ClassLoader.defineClass(ClassLoader.java:219)atorg.apache.java.lang.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:465)at java.lang.ClassLoader.loadClass(ClassLoader.java:154)atorg.apache.jserv.JServServletManager.load_init(JServServletManager.java:536)atorg.apache.jserv.JServServletManager.loadServlet(JServServletManager.java:498)at org.apache.jserv.JServContext.getServlet(JServContext.java:166)atorg.gjt.jsp.jsdk20.RequestDispatcherImpl.doServletInclude(RequestDispatcherImpl.java:255)atorg.gjt.jsp.jsdk20.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:143)at org.gjt.jsp.PageContextImpl.forward(PageContextImpl.java:364)at jsp__forums__index_2ejsp._jspService(jsp__forums__index_2ejsp.java:51)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:991)at org.gjt.jsp.JspServlet.xservice(JspServlet.java:608)at org.gjt.jsp.JspServlet.service(JspServlet.java:500)at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)atorg.apache.jserv.JServConnection.processRequest(JServConnection.java:317)at org.apache.jserv.JServConnection.run(JServConnection.java:188)at java.lang.Thread.run(Thread.java:466)
Thanks,
Bob
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think you incorrectly compiled (or referred) your class into its package - the "wrong name" error is one you get when you forget to compile a class using the package statement at the top of the java file and then try and refer to it as though it was in the package, or vice verse. For example:
//package hello
class World {
}
some code....
hello.World myMessage = new hello.World();
would raise this type of exception as would the following( which I think is your problem:
package hello
class World {
}
some code....
World myMessage = new World();
 
Bob Baker
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you are correct! I had thought I had removed the package statement from the servlet, but I had not. After putting the full package name in the call, it works just fine.
Thanks,
Bob
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic