首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

struts2 使用记录

2012-09-12 
struts2 应用记录?1.从url中获取一个参数为itemType的值再与一个数值做比较,明明返回的应该是true,但返回

struts2 应用记录

?

1.从url中获取一个参数为itemType的值再与一个数值做比较,明明返回的应该是true,但返回的确是false,问题就出现在参数的类型上,转换正确的类型问题解决。

<s:if test="(@java.lang.Integer@parseInt(#request.parameters.itemType))==4"> 

?

?

?

2.首页面不支持action跳转,在WebRoot目录中加入一个与action同名的文件即可解决问题。

?

<welcome-file-list>    <welcome-file>/indexshow</welcome-file></welcome-file-list>

?

?? ?或者使用一个静态页面来执行action,index.

<welcome-file-list>    <welcome-file>index.html</welcome-file></welcome-file-list>

?

?? ? index.html部分代码:

?

<meta http-equiv='refresh'  content='0;url=index.action'> 
?

?

?

?

热点排行