my dog learned polymorphism*
The moose likes Servlets and the fly likes RequestDispatcher Problem 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 » Servlets
Bookmark "RequestDispatcher Problem" Watch "RequestDispatcher Problem" New topic
Author

RequestDispatcher Problem

Abhishek Asthana
Ranch Hand

Joined: Sep 08, 2004
Posts: 146
Hi,
I am working on JBoss 3.2.1.
I have a module Validation which has a servlet SystemController.java
Code:

HttpSession session = request.getSession(true);
System.out.println(loggerIdentity);
//System.out.println(postedAt);
session.setAttribute("LoggerIdentity", loggerIdentity);
session.setAttribute("PostedAt",postedAt);
RequestDispatcher rd = request.getRequestDispatcher("../InformationSystem/ISController");
System.out.println(rd);
rd.forward(request, response);




This servlet calls another servlet ISController, in InformationSystem module.
But when I print rd it comes null.
Can anyone please tell me how to call the ISController .
Abhishek.
Pavel Cherkashin
Ranch Hand

Joined: Mar 04, 2005
Posts: 47
quote from API:
see API Doucumentation:
The pathname specified may be relative, although it cannot extend outside the current servlet context. If the path begins with a "/" it is interpreted as relative to the current context root. This method returns null if the servlet container cannot return a RequestDispatcher.

Saying in other words - tell us at least the context root of your currently servlet. And then It will be moe easy to answer.


Pavel Cherkashin - <br />SCJP, SCWCD, SCDJWS, SCBCD, SCEA, ...<br />www.linkedin.com/in/pcherkas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RequestDispatcher Problem
 
Similar Threads
RequestDispatcher Problem
servlet path
request redirect
problem with session tracking
getRequestDispatcher problem