分类: Struts预览模式: 普通 | 列表
09-10
17

html:select标签

<html:select property="if_end">
<option value="0">否</option>
<option value="1">是</option>
</html:select>
将option中value的值给if_end

动态用法一:

<html:select property="personnelId">

查看更多...

Tags: sel&#101;ct option

分类:Struts | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 248
09-07
01

Servlet action is not available解决方法

type Status report

message Servlet action is not available

description The requested resource (Servlet action is not available) is not available.

问题原因:

1.、web.xml文件中未配置ActionServlet。

查看更多...

分类:Struts | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 299
09-05
20

关于radio选中及其struts form取值问题

使用html:radio做选中常用两种方法,一种是order中属性给其默认值,二种在js页面使用js赋值

还有一种更加简单的,使用传统html表单的type=radio,修改name成相应属性,一样可以在action中拿到值,如下:
姓名:<html:text property="order.uname"></html:text>
      
性别:男<input type="radio" name="order.sex" value="男" checked="checked"></input>
         女<input type="radio" name="order.sex" value="女"></input>

查看更多...

Tags: radio

分类:Struts | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 776
09-05
20

No input attribute for mapping path

错误: 表单数据验证失败时发生错误,“No input attribute for mapping path”
原因:action中表单验证 validate="true" ,如果validate()返回非空的ActionErrors,将会被转到input属性指定的URI,而action中未指定input时会报此错
解决方法:添加 input="url" 或者 validate="false"

查看更多...

Tags: mapping

分类:Struts | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 414
09-03
30

struts中如何避免重复刷新(搜集)

1·使用redirect = "true"
<action
path="/testingOption"  
name="optionForm"
parameter="method"
scope="request"
type="com.appeon.manager.action.TestingOptionAction"
validate="false">
<forward name="editTesting"     path="/pages/infomanager/superTesting/wap/content/editTesting.jsp" redirect = "true"/>

查看更多...

Tags: 刷新

分类:Struts | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 356
错误 :javax.servlet.ServletException: DispatchMapping[0] does not define a handler property
原因: action参数配置不全
解决方法:在 config文件中 添加 parameter="method"等

错误: 表单数据验证失败时发生错误,“No input attribute for mapping path”
原因:action中表单验证 validate="true" ,如果validate()返回非空的ActionErrors,将会被转到input属性指定的URI,而action中未指定input时会报此错
解决方法:添加 input="url" 或者 validate="false"

错误:jsp页面中,一个form有隐藏的method属性,<input type="hidden" name="method" value="<bean:message key="button.deleteall"/>"> ,当其他的button使用 method时会默认为使用该属性,则达不到程序员预期的操作

查看更多...

Tags: Dispatch

分类:Struts | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 811