解决方案 »
- FCKEDITOR中的转义问题
- 一个小程序中有两个错误,麻烦各位给看一下
- 有关Alfresco的求助!!!
- MyEclipse中配置J2EE如何运行
- 如何使滚动条停在最底下?
- 在struts2.0中,超连接<a href='<s:url action='<s:property value="url"/>'></s:url>'>这样写对吗?
- [100分]请教Tomcat服务器问题,高手请进~
- sttuts 进不了action
- 小弟找暑假实习的地方!有无锡的程序员请进。
- jsp 中 session 或application 乱码问题
- 关于date时间类型转换
- 利用BeanUtils传输数据到模型类的问题 在线等解答
HTTP Status 404 - There is no Action mapped for namespace [/] and action name [userLogin] associated with context path [].
这个错误
<s:form action="userLogin" namespace="/demo"> tomcat里有个警告:
怎么感觉配置修改了没起作用? 我重启过tomcat了看了下生成的Html里是这样的:
<form method="post" action="userLogin" name="userLogin" id="userLogin">
提交到的url是 http://localhost/userLogin,还是报错:
HTTP Status 404 - There is no Action mapped for namespace [/] and action name [userLogin] associated with context path [].不用<s:form>标签,用<form action="/demo/userLogin.action" method="post">
提交到的url是 http://localhost/demo/userLogin.action,报错信息:
HTTP Status 404 - There is no Action mapped for action name userLogin.
当然你可以参考下我这个免费项目实例,里面也用到struts,相信对你的帮助还是有的http://blog.csdn.net/shadowsick/article/details/8903278
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="struts2" extends="struts-default">
<global-results>
<result name="login" type="redirect">/login.jsp</result>
</global-results>
<action name="userLogin" class="hs.homs.action.UserLoginAction">
<result name="success" type="redirect">/entrust.action</result>
<result name="error">/login.jsp</result>
</action>
<action name="entrust" class="hs.homs.action.EntrustAction">
<result name="success">main.jsp</result>
<result name="add">main.jsp</result>
</action>
<action name="entrust_add" method="add" class="hs.homs.action.EntrustAction">
<result name="success">main.jsp</result>
</action>
</package>
</struts>
用这个配置?
我换成这个配置了打开http://localhost/login.jsp的时候,tomcat就有警告了:
死活说找不到userLogin这个action
用这个配置?
我换成这个配置了打开http://localhost/login.jsp的时候,tomcat就有警告了:
死活说找不到userLogin这个actionjsp文件:
<s:form action="userLogin">
感谢各位