ITeye博客

Struts2

共 7 篇文章

struts2关于A web application created a ThreadLocal with key of type 异常解决办法

严重: A web application created a ThreadLocal with key of type [null] (value [com.sun.faces.config.ConfigureListener$1@1c4e792]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.…

2011-03-25 15:33 · Struts2 · Apache · XML · Tomcat · Web · SUN

struts2国际化小结

一、底层是如何运作的 1、如何获得当前JDK系统已经提供的国家语言的支持 Locale[] locales = Locale.getAvailableLocales(); for(Locale locale : locales) { //System.out.println(locale.getDisplayCountry() + " " + locale.getCountry()); System.out.println(locale.getDisplayLanguage() + " " + locale.getLanguage()); } 2、属性配置文件 命名规则:baseName_l…

2011-02-28 17:46 · Struts2 · XML · JDK · 框架

struts 2.0 url标签使用:

<s:url id="next" value="fenye.action"> <s:param name="param1" >${Action属性}</s:param> <s:param name="param2">常值</s:param> </s:url> <s:a href="%{next}">链接</s:a>

2010-12-24 10:52 · Struts2 · Struts

Struts2几个常用标签的主要属性及示例(一)

以前做过一个struts2的项目,总结了用到的几个struts2常用标签的用法,以及响应的示例代码,每个标签总结了一下主要属性,页面代码,后台代码以及生成的html代码 1. checkbox Checkbox tag用来生成html的一个input元素,类型为checkbox。这个标签常用来表示布尔型的变量。 Attributes Description name 对应action中的属性名称 fieldValue 选中时action变量被赋的值,当action的字段是布尔型的时候可以省略这个属性 value 只能为true或者false,来决定生成的checkbox是否被选中,尽量不用这…

2010-03-29 09:20 · Struts2 · J# · JSP

s:select 用法

1、在页面对应的Action中有typeBase属性,改变下拉选单的值,然后提交,typeBase的值会传到后台: <s:select name="typeBase" value="%{typeBase}" list="#{'CN':'中文','EN':'英文','FR':'外文'}" /> 这里的list是固定的,如语言别,性别等等; 2、在页面对应的Action中有inputCountryId属性,同时有countryList属性,类型为List,改变下拉选单的值,然后 提交,inputCountryId的值会传到后台: <s:select id="inputCountryId" nam…

2010-02-07 21:42 · Struts2

struts2.1.6中datetimepicker标签的使用方法

1.struts2-dojo-plugin-2.1.6.jar引入到自己的项目中。 2.jsp中加入如下内容 <%@ page language="java" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/ struts-tags" %> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> 3. <head>中加入下列 <head> <s:head theme="xhtml"/> <sx:head parseContent="true"/> </head> 4.页面中使用 <sx:date…

2009-03-22 13:07 · Struts2 · Struts · JSP · XHTML · Dojo

struts2标签

(1):<s:textfield> ---- 文本输入框 使用:<s:textfield name=”实体Bean。属性”></s:textfield> (2):<s:textarea> ----- 文本域输入框 使用:<s:textarea name=”实体Bean。属性”></s:textarea> (3):<s:password> ----- 密码输入框 使用:<s:password name=”实体Bean。属性”></s:password> 前三个基本都是一样的。如果是要显示值的话可以这样:value = “实体Bean。Get***()”。 (4):<s:radio list=”…

2009-03-20 19:08 · Struts2 · Spring · Struts · JSF · Hibernate · Bean