-
how to forward the servlet? (3 messages)
- Posted by: st rajan
- Posted on: August 26 2000 02:23 EDT
help how to us getRequestDispatcher method and i don't know how to forward the servlet? i am getting error while using getRequestDispatcher in servlet? write simple code for to forward the servletThreaded Messages (3)
- how to forward the servlet? by Pankaj Vij on August 28 2000 12:04 EDT
- how to forward the servlet? by Bryan Young on October 26 2000 10:53 EDT
- how to forward the servlet? by Bryan Young on December 18 2000 03:22 EST
- how to forward the servlet? by Bryan Young on October 26 2000 10:53 EDT
-
how to forward the servlet?[ Go to top ]
- Posted by: Pankaj Vij
- Posted on: August 28 2000 12:04 EDT
- in response to st rajan
Hi
you can use the following code to do forwarding of servlet.
ServletContext sc = getServletConfig.getServletContext();
RequestDispatcher rd = sc.getNamedDispatcher("myservlet");
rd.forward(request,response);
pankaj -
how to forward the servlet?[ Go to top ]
- Posted by: Bryan Young
- Posted on: October 26 2000 10:53 EDT
- in response to Pankaj Vij
I am new to this, so forgive me if I'm off base here, but I read that the Servlet life cycle is not guaranteed by the J2EE spec. It is vendor specific. With this in mind, what if the servlet you are trying to contact has not been instantiated yet? Wouldn't getNamedDispatcher return null causing a runtime exception? -
how to forward the servlet?[ Go to top ]
- Posted by: Bryan Young
- Posted on: December 18 2000 15:22 EST
- in response to Bryan Young
anyone?