Struts错误
来源:互联网 发布:弘历软件上班时间 编辑:程序博客网 时间:2024/05/16 15:11
敲了书上的小Demo,关于拦截器,在输入登陆信息后始终跳不到成功页面。
而MyEclipse也发出这样的警告信息:
No configuration found for the specified action: 'login.action' in namespace: '/'. Form action defaulting to 'action' attribute's literal value.
二话不说,上代码
<font color="red" style="font-size: 12px">
<s:property value="#session.errorMsg"/>
<s:form action="login.action" method="post" >
<s:textfield name="username" label="用户名" size="20"></s:textfield>
<s:password name="pwd" label="密码" size="20"></s:password>
<s:submit value="登录"></s:submit>
</s:form>
</font>
<package name = "default" extends = "struts-default" namespace = "/">
<interceptors>
<interceptor name="myitp" class="com.liu.actions.LoginInterceptor"></interceptor>
<interceptor name="contentItp" class="com.liu.actions.ContentInterceptor"></interceptor>
</interceptors>
<action name = "login" class = "com.liu.actions.UserAction">
<result name="success">/success.jsp</result>
<result name = "login">/login.jsp</result>
<interceptor-ref name="myitp"></interceptor-ref>
</action>
<action name="content" class="com.liu.actions.ContentAction">
<result>/content_success.jsp</result>
<result name="login">/content_send.jsp</result>
<interceptor-ref name="defaultStack"></interceptor-ref>
<interceptor-ref name="contentItp">
<param name="excludeMethods">login</param>
</interceptor-ref>
</action>
</package>
解决方法:试着在form表单加入<s:form action="login.action" method="post" namespace="/">
还是解决不了。我的心碎。
- Struts错误
- Struts 中常见错误
- Struts常见错误汇总
- Struts常见错误汇总
- Struts常见错误汇总
- Struts常见错误汇总
- Struts常见错误汇总
- struts常见错误
- Struts 中常见错误
- Struts常见错误汇总
- Struts常见错误汇总
- Struts常见错误汇总
- Struts常见错误汇总
- struts常见错误
- struts常见的错误
- struts 图片上传 错误
- struts常见错误
- Struts错误整理
- 如何进行产品促销研究
- [转] android自定义布局中的平滑移动
- JSP中获取Session
- lua判断一个元素是否在表里
- 二叉树的遍历有三种方式
- Struts错误
- 表单设计的思考
- Android电话短信拦截项目总结之 开发工具
- BASE64Decoder小解
- DataTable查询数据集
- Mysql中created_at字段与updated_at字段关于自动更新与自动插入时间戳
- ios中获取当前手机通讯录信息一、在工程中添加AddressBook.framework和AddressBookUI.framework
- this与super
- 写在开始之前