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

源代码在线查看: e1069. conditionally generating output using jstl in a jsp page.txt

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

相关代码

				Any non-JSP code in a JSP file is called template text and is automatically written to the output stream. The JSTL tags  and  make it possible to dynamically generate template text depending on a condition. The  tag generates its body if the expression in the test attribute evaluates to the boolean value true or the string value "true": 
				    
				    
				    
				    
				    
				        Generate this template text if p equals someValue
				    
				    
				    
				        Generate this template text if p equals "true"
				    
				
				An if/else action requires the use of the  tag: 
				    
				    
				        
				            Generate this template text if p equals someValue
				        
				        
				            Otherwise generate this template text
				        
				    
				
				Multiple conditions can be evaluated using the  tag: 
				    
				        
				            Generate this template text if p equals 0
				        
				        
				            Generate this template text if p equals 1
				        
				        
				           Generate this template text if p equals anything else
				        
				    
				
				The  can also be used to conditionally generate template text. If the value attribute is null, a default value (if specified) is generated. The default value can be specified using the default attribute or can be specified in the body content. This example demonstrates both methods: 
				    
				    
				    
				    
				    
				        Generate this if p is null
				    
				
							

相关资源