File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes RequestDispatch again... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "RequestDispatch again..." Watch "RequestDispatch again..." New topic

RequestDispatch again...

Adrian Muscalu
Ranch Hand

Joined: May 08, 2000
Posts: 73
Many posts around this subject here, at this forum. I thought I understood how to use it but apparently I am missing something. I try to forward the processing from one servlet to another; when both servlets are in the same directory it works just fine but it's not what I want. I want the servlet TestServlet1 in the directory "web-inf/classes" to forward all reuqests to the servlet TestServlet2 in the directory "web-inf/classes/login".
, where "sc" is a valid reference to the ServletContext. The deployment descriptor specifies entries for both servlets, as following:

The error I'm getting is 404, Page not Found.
I thought I played by the book, can you tell me what is wrong?

Adrian Muscalu
Ranch Hand

Joined: May 08, 2000
Posts: 73
ooops, silly me!
I've found the problem, I should have write something like this

I've tried to delete the post to hide my stupid mistake but I couldn't... I have to live with that
Albert Lee

Joined: Aug 04, 2002
Posts: 18
Why can't find RequestDispatcher???
the javac said that: Can't find class
"RequestDispatcher" [JLS 8]

Everyday create your history.
I agree. Here's the link:
subject: RequestDispatch again...
It's not a secret anymore!