Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Redirecting and send parameter to JSP page from servlet

843842Jan 19 2009 — edited Jan 19 2009
Hi All,

How can I redirecting to a JSP page and also sending a paramter to it from a servlet. I want to display the paramtere on the redirected JSP page. I try the below code but it display null

In servlet :
request.setAttribute("result", result);
RequestDispatcher rd = request.getRequestDispatcher("highlight.jsp");
rd.forward(request, response);

In jsp:
<%=session.getAttribute("result")
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2009
Added on Jan 19 2009
1 comment
156 views