Frontend page Jump mode:1. Jump with FrameA window. frames. framename. Location. href = URL; // framename indicates a frame, and URL indicates the jump path.
B. Open a new window, window. Open (URL, 'framename ');2. jump without frameA window.
The redirect method of TP frame is how to realize jump? A look at the source code, completely can not understand AH.
protected function Redirect ($url, $params =array (), $delay =0, $msg = ") {
$url = U ($url, $params);
Redirect ($url, $delay, $msg);
In a struts project, the following problem occurs:
The user's logon page address is:
Http: // localhost: 8080/sduprs/user/user_login.jsp
The address displayed after logon is:
Http: /localhost: 8080/sduprs/userLogin. do
What's even more tragic is
protected function Redirect ($url, $params =array (), $delay =0, $msg = ") {
$url = U ($url, $params);
Redirect ($url, $delay, $msg);
}
First live a URL, and then recursively pass in the third fourth parameter:
How does its jump come true??
Symptoms (symptom)
If you use the response. End, response. Redirect, or server. transfer method, a threadabortexception exception occurs. You can use a try-catch statement to catch this exception.
Cause)
The response. End method ends the page
1. RequestDispatcher. forward ()
Is used on the server. When forward () is used, the Servlet engine transmits the HTTP request from the current Servlet or JSP to another Servlet, JSP or common HTML file, that is, your form is submitted to. jsp, in.
1. RequestDispatcher. forward () Is used on the server. When forward () is used, the Servlet engine transmits the HTTP request from the current Servlet or JSP to another Servlet, JSP or common HTML file, that is, your form is submitted to. jsp, in.
1. requestdispatcher. Forward () Is used on the server. When forward () is used, the servlet engine transmits the HTTP request from the current servlet or JSP to another servlet, JSP or common HTML file, that is, your form is submitted to. JSP, in.
When writing a user verification function in the background today, You need to perform different page jumps based on the user's different permissions. The jump statement used is as follows:Response. Redirect ("logonin. aspx ");
However, the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.