This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi Everybody, Here I am facing problem in forwarding my request to Servlet from another Servlet. Here is the code I used......... ///// RequestDispatcher dispatcher = request.getRequestDispatcher("/servlets/myserv"); dispatcher.forward(request,response); ////// Here I am facing error that it is not recognising the resource not allowed HTTP 405. Even i removed the PrintWriter Implementation part in the servlet from where I am forwarding request to.......... I would be very happy if anyone could solve my problem........ cheers, email@example.com firstname.lastname@example.org
I think it is because when you use the "servlet/someservlet" nomenclature, the actual execution goes through the invoker servlet, your servlet is not really part of the "web application" as far as the request dispatcher is concerned. Bite the bullet - learn how to define servlets in web.xml and NEVER use the /servlet/ approach again! It just causes endless trouble. Bill