I am using struts2 . I want that after clicking on link on 1st page it should go to 2nd jsp page.How to do that.
Thanks in Advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First remember one thing since you are working with MCV2 based platform so its never advised to go from a
jsppage to anotherjsppage directly which is being treated as bad practice.(you are not going through proper request cycle)Request should go through Actions.Struts2 provide a convenient way to help you for such use-cases.
If in your struts config file you do not provide any
Actionclass name framework will create an action class for you on the fly with return type asSUCCESS. This is all you need to do:This is all you need and you are good to go.
Though you can go from one
JSPto Another but make sure you have no Struts2 tags and any such framework dependence since going form oneJSPto another means not calling Struts2 Dispatcher filter and not letting framework to do required work to serve you.