Reputation: 1721
Can anybody help me how can I invoke a JSP page from a Servlet (just have to invoke, no need of passing parameters).
Upvotes: 0
Views: 103
Reputation: 74036
Use the forward()
or include()
method of the RequestDispatcher
(Docu):
getServletContext().getRequestDispatcher( "yourJspPath" )
.forward(request, response);
Upvotes: 2
Reputation: 1083
Not sure what 'invoke' is supposed to mean, but if we're talking about redirecting, it could be done like that:
response.sendRedirect("your.jsp");
Upvotes: 1