Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RequestDispatch again...

 
Adrian Muscalu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
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?
Regards,
Adrian
 
Adrian Muscalu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why can't find RequestDispatcher???
the javac said that: Can't find class
"RequestDispatcher" [JLS 8]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic