Problems when trying to redirect to JSP pages in Tomcat
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Arun_Bhat
Posted On:   Wednesday, April 25, 2001 02:58 PM

I am using Tomcat 3.2.1 with JBoss and configured with no Web server. I am trying to create a web application wherein i need to redirect to a JSP page. When i try using servlet.getServletContext() to get the RequestDispatcher, it seems to be giving a null pointer exception on line 205:GenericServlet. I have set the context on Tomcat and the problem persists. I have moved to using response.sendRedirect(..) but feel that the RequestDispatcher allows relative page redirect. Any help will be greatly appreciated.

Thanks

Re: Problems when trying to redirect to JSP pages in Tomcat

Posted By:   AlessandroA_Garbagnati  
Posted On:   Wednesday, April 25, 2001 04:26 PM

Hi,

Try using the same method (getRequestDispatcher()) but instead of getting it from the servlet context, get it from the request itself. It should work.
About | Sitemap | Contact