The function of the jump:
You can use a jump instruction to transfer a user's request from one page to another page.
For example: User login QQ space, if the user name and password correct words will jump to the home page, otherwise it will jump to the failure page.
Syntax for jump directives:
Do not pass parameters <jsp:forward page= ""/>
Passing parameters: <jsp:forward page= "" >
<jsp:param name= "parameter name" value= "parameter Content" >
</jsp:forward>
Let's look at a program instance:
forward_01.jsp
Forward_02.jsp (This is the display page after the jump)
<%@ page contenttype= "text/html" pageencoding= "GBk"%>
A run can be found that the page did jump.
Notice here:
There is no change in the address bar now so this kind of jump, in the actual development of the server side of the jump, because the page after the jump changes, but the address bar has not changed
But when there is only one parameter, that is, if the accepted parameter is not enough, then the return is null
Jump instructions Note the problem:
1. The syntax of the jump instruction is used more, the attention distinguishes contains the instruction.
2. Emphasis must be placed on "/" to end the labeling instructions;
This article is from the "Zhao Yuqiang blog" blog, please be sure to keep this source http://zhaoyuqiang.blog.51cto.com/6328846/1126971