How can you maintain servlet chaining?
Answer / bikash khuntia
you can maintain servlet chaining by using:
1. RequestDispatcher
2. include
Step 1: Set the request
request.setAttribute(key,value);
Step 2: Implimanting of RequestDispatcher
RequestDispatcher rsd = getServletContext().
getRequestDispatcher("Servletname");
Step 3: Forward or include the request and response by
rsd.forward(request,response);
rsd.include(request,response);
| Is This Answer Correct ? | 2 Yes | 3 No |
Differentiate between the web server and application server?
Explain the role of dispatcherservlet and contextloaderlistener.
Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?
how the server will know its the same jsp page?
What is the default http method in the servlet?
Explain url encoding in servlet?
What is cookies in servlet with example?
How servlets are deployed in java?
What is use of parseQueryString?
What is the GenericServlet class?
Can we override the ActionServlet?
3 Answers ArisGlobal, HCL, PPF,
What’s the difference between genericservlet and httpservlet?