struts tags bean
来源:互联网 发布:如何增加房间湿度 知乎 编辑:程序博客网 时间:2024/04/29 22:30
struts tags bean
1.将以下三个常用struts tags 放到一个jsp页面下:tags.jsp
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
2.bean标签
<bean:cookie id="sess" name="JSESSIONID" value="JSESSIONID-IS-UNDEFINED"/>
将JSESSIONID的cookie定义为id为sess的bean
显示sess的comment属性:<bean:write name="sess" property="comment"/>
显示sess的maxAge属性:<bean:write name="sess" property="maxAge"/>
显示sess的path属性:<bean:write name="sess" property="path"/>
显示sess的secure属性:<bean:write name="sess" property="secure"/>
显示sess的value属性:<bean:write name="sess" property="value"/>
显示sess的version属性:<bean:write name="sess" property="version"/>
<bean:define/>:
<bean:define id="bianliang name" value="bianliang value"/> int i=0;
<bean:define id="variable1" name="variable2"/> //将variable2赋给variable1,同时定义了variable1
<bean:define id="variableName" name="beanName" property="beanProperty"/>将bean的property赋给variableName
<bean:define id="bean1" name="bean2" scope="scope1" toScope="scope2"/> 将scope1范围中的bean1转换到scope2范围中的bean2
<bean:header/>:
<bean:header id="variableName" name="headerName"/> 将headerName的请求头定义成variableName变量
<bean:parameter/>:
<bean:parameter id="variableName" name="parameter"/>将请求parameter的请求参数的值赋给variableName
url?b=xxx
<bean:parameter id="a" name="b"/>
<bean:include/>:
<bean:include id="beanName" path="uri"/>将uri对应的jsp资源赋给bean
- struts tags bean
- Struts tags (2) ----Bean(1)
- Struts tags (3) ----Bean(2)
- Struts tags (2) ----Bean(1)
- Struts tags (3) ----Bean(2)
- Bean:Tags
- Struts tags详解(Data tags)
- Can not find the tag library descriptor for "http://struts.apache.org/tags-bean
- struts tags logic
- struts tags logic
- Struts 2.1 Tags
- Struts 2 Data Tags
- Struts 2 Control Tags
- Struts 2 Data Tags
- Struts 2.1 Tags
- Struts2--struts-tags
- Struts 2.1 Tags
- Struts2--struts-tags (转)
- 恼人的Eclipse和Tomcat整合后,不能自动编译Tomcat Project的java文件的问题终于解决啦
- spring 整合struts
- hibernate 批量处理
- struts tags logic
- 开始新的发现
- struts tags bean
- 2007年web开发技术预言
- spring 事务代理创建及简化事务配置
- socket()的内核实现(1)——sys_socketcall()
- spring AOP 代理(代理接口)
- 为什么数据库中有帐号和密码,登陆的时候还提示我帐号不存在
- FI tables relation (财务常用表关系)
- 算法
- 银行模拟系统(1)