aspose file tools*
The moose likes JSP and the fly likes Forwarding to a servlet in GNUJSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Forwarding to a servlet in GNUJSP " Watch "Forwarding to a servlet in GNUJSP " New topic
Author

Forwarding to a servlet in GNUJSP

Bob Baker
Greenhorn

Joined: Mar 22, 2002
Posts: 7
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

Joined: May 24, 2001
Posts: 245
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();


chanoch<p><a href="http://www.amazon.com/exec/obidos/ASIN/1861007736/" target="_blank" rel="nofollow">Author of Professional Apache Tomcat</a></p>
Bob Baker
Greenhorn

Joined: Mar 22, 2002
Posts: 7
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Forwarding to a servlet in GNUJSP
 
Similar Threads
MySQL JDBC Driver with Apache JServ
configuring MySQL JDBC Driver with Apache JServ
[error] error: Class names, 'JFileChooser', are only accepted if annotation processing is explicit
Run applet from command line