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!

how to forward a page in jsp?

843838Sep 25 2006 — edited Sep 25 2006
hi,
I have 5 button, Now i want to forward page when a user will click a button? my following code is for the action of a main form,,,,,,
<%
String action=request.getParameter("submit");
	if(action.equalsIgnoreCase("For dynamic form set")){
		RequestDispatcher rd =request.getRequestDispatcher("FrameSet.jsp");
		rd.forward(request,response);
	}
	else if(action.equalsIgnoreCase("Data Read")){
		RequestDispatcher rd =request.getRequestDispatcher("DataReadForm.jsp");
		rd.forward(request,response);
	}
	else if(action.equalsIgnoreCase("New Registration")){
		RequestDispatcher rd =request.getRequestDispatcher("NewRegistration.jsp");
		rd.forward(request,response);
	}
	else if(action.equalsIgnoreCase("Continue from previous position")){
		RequestDispatcher rd =request.getRequestDispatcher("FrameSet.jsp.jsp");
//		RequestDispatcher rd =request.getRequestDispatcher("ContinuesForm.jsp");
		rd.forward(request,response);
	}
	else if(action.equalsIgnoreCase("Frame Search")){
		RequestDispatcher rd =request.getRequestDispatcher("FrameSearch.jsp");
		rd.forward(request,response);
	}
%>
my problem is that ...when i click "For dynamic form set" button then it go FrameSet page, But when i click another button then my code is not working. What's the problem of my code? how i will forward a page in jsp . Is there anyone who can help me about this? Please help me.
With regards
Bina
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2006
Added on Sep 25 2006
1 comment
164 views