Vasu:

Try:context.getRequestDispatcher("/servlet/HelloWorldExample3");
I think the structure of your url is what is the problem.

Geeta


Vasu Y wrote:

> Revathi,
>  I tried RequestDispatcher.forward(request, response), but doesn't work.
> The following is the code I tried on Tomcat 4.
> Both the servlets are deployed on the same machine.
>
> Can u tell me if I'm missing something....
>
> //////////////Code Servlet 1 - service() method//////////
> response.setContentType("text/html");
> PrintWriter out = response.getWriter();
> ServletConfig config = getServletConfig();
> ServletContext context = config.getServletContext();
> RequestDispatcher dispatcher = 
>context.getRequestDispatcher("//examples//servlet//HelloWorldExample3");
> dispatcher.forward(request, response);
> out.flush();
> //////////////End Code///////////////
>
> //////////////Code Servlet2 - service() method//////////////
> response.setContentType("text/html");
> PrintWriter out = response.getWriter();
> out.println("Hello World Servlet Three");
> //////////////End Code///////////////
>
> Thanks,
> Vasu
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to