servlet service and include

K

kmat

Hi,
inside the service method of a Servlet1 I have the following code

RequestDispatcher rd = request.getRequestDispatcher("Servlet2");
rd.include(request,response);

in the service method of Servlet2 the following is the line of code,

request.setAttribute("hi", "hello");

But the include call does not activate the service method in Servlet2.
If I change the method from service to doGet in both servlets it works?

In short why include does not work in service()
mat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top