How can we forward the request from jsp page to the servlet?
Answer / Ayushi Singh
To forward a request from a JSP page to a Servlet, you can use the RequestDispatcher object. The following code demonstrates an example: <% PageContext pc = request.getPageContext(); RequestDispatcher rd = pc.getRequestDispatcher("/ServletName"); rd.forward(request, response); %>
| Is This Answer Correct ? | 0 Yes | 0 No |
Is jsp a programming language?
What are scripting elements?
What is the difference between jsp and php?
What are different implicit objects of jsp?
What does it mean when tags or attributes are said to be deprecated?
Can we write a class inside Jsp?
What is jsp standard tag library, provide some example usage?
What is jsp life cycle?
How we can configure init params in jsp?
How do I prevent the output of my jsp or servlet pages from being cached by the browser?
What are the advantages of jsp?
Explain jsp:plugin action?