For the first time: 1. Direct forwarding configuration, you can transfer the request directly to the specified location in Struts-config.xml:, if: When on the web When you open Welcome.do, you will automatically jump to the use of index.html 2.cookie: Add a sentence in the JSP page header: <% @ Taglib URI = "/ tags / struts-bean" prefix = "bean"%> with the following Code new cookie. Take the value of cookie: (1) This method, when Comment is empty, show NULL (2) When Comment is empty, what is not displayed 3. INT, FLOAT, STRING and other data types On the page display: The function of the bean with a TestBean returns a variety of data types. Use the following clause to take the bean object. Use the following statement to define the value of the various data types of data:
Java code:
1
2
3
4
5
6
7
8 9
Use the following method to display the value:
Java code:
1
2 <% = Test1_Boolean%>
3 <% = Test1_double%>
4 <% = Test1_String%>
5 ................
6