|
|
Redirect a page and pass some message - JSP/Java
|
Views : 1002
|
|
Tagged in : JSP-Java
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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 |
|
|
|