struts2 里copy出来的struts.xml 贴在项目的src里
<result type="redirectAction">
这行报错:Package with namespace /example cannot be found
这个错误怎么解决啊
我用的myeclipse开发工具
<result type="redirectAction">
这行报错:Package with namespace /example cannot be found
这个错误怎么解决啊
我用的myeclipse开发工具
解决方案 »
- 用httpclient实现一个代理器可行吗?
- hibernate环境配置好了运行时报下面错误,菜鸟,请高手指点
- java程序发短信到手机上,请问这个原理是什么,需要其他什么条件吗
- apache-tomcat-6.0.16下下找不到jk2.properties这个文件
- 新手请教:axis的作用是什么?和webservice、soap什么关系?
- 一个弱智问题
- JSP+Servlet的服务器配置问题!
- 怪问题!Tomcat5.0.27换成5.0.28又出现乱码!急.........
- 怎么不用开发工具而用一般的编辑工具如记事本编写一个最简单的Struts应用?有什么步骤??????
- 关于weblogic连接池---为什么受伤的总是我
- eclipse helios版 maven插件问题
- Struts2中Action转发到jsp页面后,Action的值用EL表达式取总是为空
<result name=“hello”type="redirectAction"> 是两个name属性值的相加就是访问路径 你肯定没有设计好 你再看看你struts.xml的设置
是action那行吧
里面namespace属性 的值/example
你自己再理解理解 namespace是干什么的吧
-<web-app xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" id="WebApp_9"> <display-name>Struts Blank</display-name> -<filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> -<filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> -<welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app>
这是xml 的内容<result type="redirectAction">
这行报错:Package with namespace /example cannot be found
namespace="/export">
<action name="*ExportWrite" class="exportOrderCabinExportWriteAction"
method="{1}">
<result name="findExportList">
/export/exportOrderCabin_list.jsp
</result>
</action>
</package>
这是我现在用的一个好的配置访问的路应该加上 namespace 里面的内容吧
你的应该这样写吧
<package name="example" extends="struts-default"namespace="/example">
...
</package>
</struts>