Function:
Page A1 pass a value: ZSDWH, to the B page, then to the C page, then the C page then return the value to b page, b page back to the A1 page.
Page A2 pass a value: YWZX, to the B page, then to the C page, then the C page then return the value to b page, b page back to the A2 page.
(This is only for example A1-->B--C;C-->B-->A1)
Steps:
One, A1 page, value: ZSDWH assigned to RequestType
Second, according to the Struts configuration file, find the Shiftnetflowinfo method in the background action,
Third, add code in method Shiftnetflowinfo:
String RequestType = Request.getparameter ("RequestType");//Accept the value of RequestType from the foreground page: ZSDWH
Request.setattribute ("RequestType", RequestType);//Bring the value back to the foreground page after this method executes (temporarily named B page here)
Iv. based on the struts configuration file, find the page that jumps after the last method execution: shiftnetflowinfo.jsp
In the B page (shiftnetflowinfo.jsp), add the following code:
Vi. find the Snfhistory method in the background action based on the struts configuration file
Seven, add code in method Snfhistory:
String RequestType = Request.getparameter ("RequestType");//Accept the value of RequestType from the foreground page: ZSDWH
Request.setattribute ("RequestType", RequestType);//Bring the value back to the foreground page after this method executes (temporarily named C page here)
Eight, according to the Struts configuration file, find the last method to jump after the page: snfhistoryinfo.jsp
Nine, in the C page (snfhistoryinfo.jsp) Add the following code (too long to intercept the diagram, paste the code directly):
<c:if test= "${requesttype== ' ZSDWH '}" >
<input type= "button" name= "button" id= "button" value= "return" class= "Submit" onclick= "window.location.href=" <SKC: Go name= "shiftnetflow_shiftnetflowinfo" defaulturi= "shiftnetflow.do?requesttype=zsdwh" ></skc:go> "/>
</c:if>
Comments:
The last requesttype=zsdwh of the second line of code is to bring the value back to the background action method: Shiftnetflowinfo
According to the Struts configuration file:
Bring the value back to page B (shiftnetflowinfo.jsp)
Ten, in the B page, add Judgment method, if the value equals ZSDWH, click the Back button, according to the struts configuration file, will execute method: Getshiftnetflowsheettoedit
<c:if test= "${requesttype== ' ZSDWH '}" >
<input type= "button" name= "button" id= "button" value= "return" class= "Submit" onclick= "window.location.href=" <SKC: Go name= "Shiftnetflow_getshiftnetflowsheettoedit" defaulturi= "getshiftnetflowsheettoedit.do" </skc:go> "/ >
</c:if>
PS: Resolved, two pages (page A1, page A2), call the same method to jump to the same page (page b), click the Return button, you can jump back to the original page.
JSP page Pass Value