aspose file tools*
The moose likes Servlets and the fly likes RequestDispatcher? wat shld be the classpath? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "RequestDispatcher? wat shld be the classpath?" Watch "RequestDispatcher? wat shld be the classpath?" New topic
Author

RequestDispatcher? wat shld be the classpath?

Ravi Sathish
Ranch Hand

Joined: Feb 26, 2002
Posts: 131
hi guys!
I am using jdk1.3.1; jsdk2.0; tomcat 3.2.2;
what should be the classpath to make RequestDispatcher work...
If somebody throws some light on how request dispatcher works it will be even better
I am trying to send some info frm a servlet to a jsp.. The code goes like this...
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/Login.jsp");
dispatcher.include(req, res);
compiler is giving error as getRequestDispatcher not found;
please help me
TIA
Ravi
Steve Granton
Ranch Hand

Joined: Jan 13, 2002
Posts: 200
Hi,
The class is in the j2ee.jar, which will probably be included into the classpath of the container - though you will need to add it to your classpath for compilation.
In order to automate the build process you could use Ant from the Apache Jakarta Project (http://jakarta.apache.org/ant/manual/)
As for how to use the RequestDispatcher - take a look at the API docs at java.sun.com or do a search on this forum - I'm sure there has been plenty said about it.
Cheers,
Steve
timothy zimmerman
Ranch Hand

Joined: Jun 26, 2001
Posts: 149
javax.servlet.RequestDispatcher is in the servlet.jar that you should have gotten with tomcat look in the TOMCAT_HOME lib directory.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RequestDispatcher? wat shld be the classpath?