You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Arun Bhat <ar...@dante-consulting.com> on 2001/04/26 21:31:12 UTC

Can't redirect from servlet to jsp

I am using JBoss 2.2.1 with Embedded Tomcat 3.2.1. I tried redirecting to another jsp using 
servlet.getServletContext.getRequestDispatcher("path"); and requestDispatcher.forward(...).
I get the following exception when i do the above:
[EmbeddedTomcat] Servlet context: org.apache.tomcat.facade.ServletContextFacade@
1318b Path: /jsp/Login.jsp Real path: C:\AppServer\JBoss\JBoss-2.2.1_Tomcat-3.2.
1\tomcat\webapps\myServletApp\jsp\Login.jsp
[EmbeddedTomcat] Dispatcher: org.apache.tomcat.facade.RequestDispatcherImpl@6903
d5
2001-04-26 01:56:34 - Ctx( /login ): Exception in: R( /login + /jsp/Login.jsp +
null) - javax.servlet.ServletException
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:611)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4
04)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372
)
        at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
herImpl.java:194)
        at myprojects.examples.RequestContext.forward(RequestContext.java:102)
        at myprojects.examples.LoginDelegate.service(LoginDelegate.java:39)
        at myprojects.examples.LoginServlet.service(LoginServlet.java:91)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:611)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4
04)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372
)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.
java:797)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743
)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:210)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
:498)
        at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.NoSuchMethodError
        at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:209)

        at jsp._0002fjsp_0002fLogin_0002ejspLogin_jsp_5._jspService(_0002fjsp_00
02fLogin_0002ejspLogin_jsp_5.java:70)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:611)
        at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspSer
vlet.java:177)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
18)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:611)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4
04)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372
)
        at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
herImpl.java:194)
        at myprojects.examples.RequestContext.forward(RequestContext.java:102)
        at myprojects.examples.LoginDelegate.service(LoginDelegate.java:39)
        at myprojects.examples.LoginServlet.service(LoginServlet.java:91)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:611)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4
04)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372
)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.
java:797)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743
)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:210)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
:498)
        at java.lang.Thread.run(Thread.java:484)

Thanks,
Arun

Arun Bhat
Software Engineer
Dante Consulting, Inc.
www.dante-consulting.com

1550 Wilson Blvd, Suite 705
Arlington, VA 22209
(703) 807-0520

=======================================================
The information contained in this electronic transmission is intended only
for the use of the recipient and may be confidential and privileged.
Unauthorized use, disclosure or reproduction is strictly prohibited, and may
be unlawful. If you have received this electronic transmission in error,
please notify the sender immediately.
=======================================================