Atitit.web dynamic include and variable pass java. net PHP
1. Dynamic include <jsp:include 1
2. Using QueryString 1
3. Use the Session variable 1
4. Use Server.Transfer//request.getrequestdispatcher (tmpltpage). forward (Request, response); 2
5. Cookies, this HTML can be passed between the two ... 2
6. Reference 2
1. Dynamicinclude<Jsp:include
Use to implement components separated from the implementation of a template ... . Implement IOC,,, Delay Binding
<Jsp:include page="<%=Request.getparameter ("TMPLT")%>" Flush="true" />
Jsp:include the absolute path is applied Maguan , automatically suitable ... Sub-application Ya 10 root number start ..
2.UseQueryString
Use querysting passing values between pages is a very old mechanism, and the main advantage of this approach is that it is very simple to implement, but its disadvantage is the value passed Yes will show on the address bar of the browser (unsafe), but not the object, but in many of the values passed and the security requirements are not high, this method is more preferred to use.
Author:: Old Wow's paw attilax Ayron, email:[email protected]
Reprint please indicate source: Http://blog.csdn.net/attilax
3.UseSessionvariables
using session variables is another way to pass values between pages, in this case we have the values in the control in the Session variable, Then use it on another page,
4.UseServer.Transfer //Request.Getrequestdispatcher(Tmpltpage).forward(Request, Response);
This method is slightly more complex than the one described above, but is particularly useful in variable transfer between pages, and you can use this method to access The object properties in another page. revealed by value and, of course, using this method, you need to write some extra code to Create some Properties so that it can be accessed on another page, but the benefits of this approach are also obvious. In general, using this approach is concise and object-oriented . The whole process of using this method is as follows
String tmpltpage="/com.attilax/dsm/tmplt_edit.jsp";
Try {
Request . Getrequestdispatcher (tmpltpage) . forward (request, response) ;
5. Cookies,this canHTMLpassed between the two....
6. Reference
passing variables between two asp .- Weinideai 's Column - Blog channel -CSDN.NET.htm
Atitit.web dynamic include and variable pass java. NET PHP