这里面包含了一百多个JAVA源文件

源代码在线查看: e1067. saving data using jstl in a jsp page.txt

软件大小: 551 K
上传用户: maple_78
关键词: JAVA
下载地址: 免注册下载 普通下载 VIP

相关代码

				When a JSP page needs to save data for its processing, it must specify a location, called the scope. See e1048 Saving Data in a JSP Page for an explanation of the four available scopes. 
				Data is saved using a mechanism called scoped variables. A scoped variable has a name, which is of type String and a value, which is of type Object. For non-page scoped variables, it is recommended that the name use the reverse domain name convention (e.g., prefixed with com_mycompany) to minimize unexpected collisions when integrating with third party modules. 
				
				When using the JSTL's expression language (see e1065 Enabling the JSTL Expression Language in a JSP Page), the variables in each scope are made available in the implicit objects pageScope, requestScope, sessionScope, and applicationScope. 
				
				This example saves and retrieves values in scoped variables in each of the four scopes: 
				
				    
				    
				    
				    
				    
				    
				    
				    
				    
				    
				    
				    
				    
				    
				
				When retrieving a saved value, it is possible to omit the scope. If the scope is omitted, the variable name is automatically searched for in each of the scopes, in the order pageScope, requestScope, sessionScope, and applicationScope. 
				    
				    
				    
				    
				    
				
				It is also possible to specify the value to save using the contents of the body, rather than through the value attribute: 
				    
				    
				        value 1 in body
				    
				    
				        value 2 in body
				    
				    
				        value 3 in body
				    
				    
				        value 4 in body
				    
				
				When specifying the value using body contents, the body contents is first trimmed of leading and trailing white space before it is saved. For example, 
				    
				        line 1
				        line 2
				    
				
				would be saved as: 
				    "line 1\n    line 2"
				
							

相关资源