实验室网站所遇技术(三) struts1.2.9的通配符配置
2012-08-08 21:31
369 查看
今天为了简化struts的配置,研究通配符,发现一个有意思的地方。
我的struts版本是1.2.9
看配置文件
前台jsp页面的请求不管是这样
还是这样
都是一个错误
我就很纠结了,这是参照网上的博客改写的。
后来不断尝试发现这样写就可以
前端访问页面的form是
问题解决了,可以批量写配置了。
但是那个错误问题还是没弄懂?求解?
我的struts版本是1.2.9
看配置文件
<action path="/regist_*" name="registForm" type="com.lihua.actions.RegistAction" parameter="{1}"> <forward name="success" path="/index.jsp"/> </action>
前台jsp页面的请求不管是这样
<form action="regist_add.do" method="post">
还是这样
<form action="regist_add.do?method=add" method="post">
都是一个错误
严重: Request[/regist_add] does not contain handler parameter named 'add'. This may be caused by whitespace in the label text. 2012-8-8 21:24:51 org.apache.struts.action.RequestProcessor processException 警告: Unhandled Exception thrown: class javax.servlet.ServletException 2012-8-8 21:24:51 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet action threw exception javax.servlet.ServletException: Request[/regist_add] does not contain handler parameter named 'add'. This may be caused by whitespace in the label text.
我就很纠结了,这是参照网上的博客改写的。
后来不断尝试发现这样写就可以
<action path="/regist_*" name="registForm" type="com.lihua.actions.RegistAction" parameter="method"> <forward name="success" path="/index.jsp"/> </action>
前端访问页面的form是
<form action="regist_add.do?method=add" method="post">
问题解决了,可以批量写配置了。
但是那个错误问题还是没弄懂?求解?
相关文章推荐
- 实验室网站所遇技术(一) struts1 数据源配置
- Struts(七):action配置文件之通配符映射
- Struts2的struts.xml中配置及通配符的使用
- velocity+spring mvc+spring ioc+ibatis初试感觉(与struts+spring+ibatis比较) - 巴士飞扬-专注编程,网站,专业技术
- struts通配符和拦截器配置
- 【Struts2学习笔记】struts2.5使用通配符配置action跳转
- struts【2】(action的配置--通配符)
- IIS发布网站部分特殊配置--图片上传至别的服务器、iis配置 通配符应用程序映、iis配置 C#底层拦截.htm文件请求
- struts有关action配置的通配符配置问题
- struts.xml属性配置,action属性,通配符,action接受参数(二)
- struts.xml配置之动态调用与通配符
- struts2.0配置中的通配符方法
- Ubuntu - unixodbc 配置 - zhouzhk - ITeye技术网站
- struts2.3.x中的基本配置、类型转换、通配符的设置
- velocity+spring mvc+spring ioc+ibatis初试感觉(与struts+spring+ibatis比较) - 巴士飞扬-专注编程,网站,专业技术
- struts 2--actionwildcard 通配符配置
- struts.xml配置详解(所有基本配置,包括通配符)
- Maven简介(一)——Maven的安装和settings.xml的配置 - 好好学习,天天向上 - ITeye技术网站
- 绝猛资料:Cisco技术网站最佳经典配置下载
- 实验室网站所遇技术(二) AJAX实现工具提示