strust.xml内容如下:
<?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="default" namespace="/" extends="struts-default">
<action name="hello">
<result >
/Hello.jsp
</result>
</action>
</package></struts>
(注:Hello.jsp的功能就是在页面显示:“Hello Struts2”)
我启动tomcat,在项目上Run as→MyEclipse Server Application,在Web Browser中成功显示“Hello Struts2”。然后我修改strust.xml文件:
①<action name="hello_struts">,
②加入<constant name="struts.devMode" value="true" />这一行再在Servers中Redeploy该项目,再在Web Browser中输入http://localhost:8080/Struts2_0100/hello_struts
就显示不出来“Hello Struts2”了错误: There is no Action mapped for namespace / and action name hello_struts.多次Redeploy项目都不行,这是为什么??
求助!
<?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="default" namespace="/" extends="struts-default">
<action name="hello">
<result >
/Hello.jsp
</result>
</action>
</package></struts>
(注:Hello.jsp的功能就是在页面显示:“Hello Struts2”)
我启动tomcat,在项目上Run as→MyEclipse Server Application,在Web Browser中成功显示“Hello Struts2”。然后我修改strust.xml文件:
①<action name="hello_struts">,
②加入<constant name="struts.devMode" value="true" />这一行再在Servers中Redeploy该项目,再在Web Browser中输入http://localhost:8080/Struts2_0100/hello_struts
就显示不出来“Hello Struts2”了错误: There is no Action mapped for namespace / and action name hello_struts.多次Redeploy项目都不行,这是为什么??
求助!
解决方案 »
- 不能装入JDBC驱动类的net.sourceforge.jtds.jdbc.Driver;
- 请教如何做音乐播放器?
- 过路的看看 怎样判断一个文件是否是真实类型
- struts , jsp问题请教
- Hibernate 多表查询能否直接返回包含同一种类的对象的结果?
- Ireport 分组合并。懂得大神快进来啊!!
- DOM4J的parseText方法为什么不能解析\n
- 请问在那里可以下载到完整的j2ee规范,谢谢
- 申请java enterprise open source 子版版主版主
- JBoss OpenTool出了新最新版2.6,可以更好的支持JBOSS 3.2
- weblogic部署失败
- struts1+hibernate+spring怎么调用Oracle函数
命名空间 namespace="/" 访问的时候加后缀。楼主自己谷歌 struts namespace把
http://localhost:8080/Struts2_0100/hello_struts.action
为什么我之后就跳转不到Hello.jsp文件了?