struts2
zhengmj777
这个作者很懒,什么都没留下…
展开
-
使用struts2中的datetimepicker标签
1: 必须在jsp页面中的head标签中加入: 例: Sign On 2:在web.xml中加入如下url pattern: struts2 org.apache.struts2.dispatche原创 2009-04-17 17:57:00 · 1382 阅读 · 0 评论 -
Struts2的国际化
每种框价都会有国际化的支持,struts2的国际化大致上分为页面的国际化,Action的国际化以及xml的国际化 首先在struts.properties文件中加入以下内容:struts.custom.i18n.resources=messageResource或在struts.xml中加入 资源文件的命名格式: 名称_语言代码_国家代码. Properties转载 2009-05-26 11:47:00 · 893 阅读 · 0 评论 -
checkboxlist标签
jsp代码: action代码:import com.opensymphony.xwork2.ActionSupport;public class Login extends ActionSupport { private String[] color; public String[] getColor() { return color;原创 2009-05-12 17:15:00 · 711 阅读 · 0 评论 -
redirect-action传参数
/example/Login.jsp /test Menu?message=${message}&num=${num} /原创 2009-05-08 09:44:00 · 2387 阅读 · 0 评论 -
action获取ValueStack中的值
HttpServletRequest request = ServletActionContext.getRequest();ValueStack vs = (ValueStack)request.getAttribute("struts.valueStack");String username = vs.findValue("username").toString();或:Val原创 2009-05-08 15:15:00 · 3438 阅读 · 0 评论 -
struts2中set标签
或原创 2009-05-06 14:51:00 · 1573 阅读 · 0 评论 -
struts2中if标签
一、action中: private Map map = new HashMap(); public Map getMap() { return map; } public void setMap(Map map) { this.map = map; } List > list = new ArrayList>(); public Lis原创 2009-05-05 10:12:00 · 669 阅读 · 0 评论 -
struts2中select标签
一、 action中: private Map map = new HashMap(); public Map getMap() { return map; } public void setMap(Map map) { this.map = map; } public String execute() throws Exception {原创 2009-05-05 09:28:00 · 626 阅读 · 0 评论 -
深入学习Struts2
深入Struts2的配置文件本部分主要介绍struts.xml的常用配置。1.1. 包配置:Struts2框架中核心组件就是Action、拦截器等,Struts2框架使用包来管理Action和拦截器等。每个包就是多个Action、多个拦截器、多个拦截器引用的集合。在struts.xml文件中package元素用于定义包配置,每个package元素定义了一个包配置。它的常用属性转载 2009-05-05 16:34:00 · 633 阅读 · 0 评论 -
struts2中格式化输出数字和日期的方法
资源文件......##format dates and numbers global.format.money={0,number,#,##0}global.format.date={0,date,yyyy-MM-dd} JSP文件格式化时间: 格式化数字:原创 2009-04-22 11:54:00 · 1511 阅读 · 1 评论 -
redirectAction配置
../User UserSubAction_preRegister ${queryStr} 注:redirectAction和redirect-action配置方法一样,只是redirect—action不建议使用了原创 2009-06-24 09:55:00 · 1559 阅读 · 2 评论