Redirect a page and pass some message - JSP/Java Views : 1002
Tagged in : JSP-Java
0 0
Send mail
Hi,
If you want to redirect a page with some message can be add the following code to your servlet coding.

RequestDispatcher rd = request.getRequestDispatcher("Resource File's url");
Object obj=new Object();//add content to obj

request.setAttribute("msg",obj);
rd.forward(req, resp);

You can get the object in your resource file by using

Object obj=(Object)request.getAttribute("msg");


Regards,
Vinoth.
By Vinoth, On - 2008-12-19



    Login to add Comments .