struts的bean标签
来源:互联网 发布:mac系统dmg下载地址 编辑:程序博客网 时间:2024/06/06 03:31
例子:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@page import="blog.User"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<!--这里的uri是在项目中的struts-1.3.10-all\struts-1.3.10\lib\struts-taglib-1.3.10.jar的META-INF下的tld文件夹下的struts-bean.tld文件中的<uri>http://struts.apache.org/tags-bean</uri>信息中的 -->
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
String username = "abcde";
request.setAttribute("username",username);
User user = new User();
user.setUsername("edcba");
session.setAttribute("user",user);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title></title>
</head>
<body>
<bean:define id="username1" name="username" scope="request" toScope="session">
</bean:define>
username1:<bean:write name="username1" scope="session"/><br/>
<bean:define id="username2" name="user" scope="session" toScope="request">
</bean:define>
username2:<bean:write name="username2" scope="request" property="username"/>
</body>
</html>
- struts的bean标签
- Struts的bean标签
- struts bean标签的介绍
- struts的bean标签用法
- Struts的bean标签库
- struts标签:bean标签
- Struts标签-BEAN标签
- struts标签---bean标签
- Struts 的标签库 Struts bean write 输出 格式化 标签
- struts标签bean:write的用法
- struts的bean标签(二)
- struts的bean标签使用message
- Struts - 标签库(Bean)
- struts Bean标签库
- struts标签-------bean
- Struts-Bean 标签库
- struts Bean 标签库
- Struts-Bean 标签库
- Android联系人provider操作之permission设置
- Qt图标
- Delphi类的静态属性及方法。
- 异步串行通讯和同步串行通讯
- GlusterFS:No such file or directory
- struts的bean标签
- ruby&python 从CGI 到 WSGI 到 Rack, 顺带Sinatra
- Linux kernel --- VirtualBox
- 专家讲解:Md5(base64)加密与解密实战
- web项目Spring框架下虚拟测试端编写
- 多个文件下使用全局变量
- lr_convert_string_encoding
- 用Mac和Linux命令行工具使用Windows Azure
- 二十六、JCreator使用初步