-----------------------------struts.xml中的配置--------------------------------------
<struts>
<package name="crm" extends="struts-default" namespace="/">
<interceptors>
<interceptor name="userInterceptor" class="com.itheima.interceptor.UserInterceptor"/> <interceptor-stack name="myStack">
<interceptor-ref name="userInterceptor"/>
<interceptor-ref name="defaultStack"/>
</interceptor-stack>
</interceptors>
</package>
</struts>
@Controller("visitAction")
@Scope("prototype")
@Namespace("/")
@ParentPackage("struts-default")
@InterceptorRef("myStack")
public class VisitAction extends BaseAction implements ModelDriven<Visit>{}
启动服务时报错:
Caused by: Unable to load configuration. - [unknown location]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
... 14 more
Caused by: Unable to find interceptor class referenced by ref-name userInterceptor - [unknown location]
<struts>
<package name="crm" extends="struts-default" namespace="/">
<interceptors>
<interceptor name="userInterceptor" class="com.itheima.interceptor.UserInterceptor"/> <interceptor-stack name="myStack">
<interceptor-ref name="userInterceptor"/>
<interceptor-ref name="defaultStack"/>
</interceptor-stack>
</interceptors>
</package>
</struts>
@Controller("visitAction")
@Scope("prototype")
@Namespace("/")
@ParentPackage("struts-default")
@InterceptorRef("myStack")
public class VisitAction extends BaseAction implements ModelDriven<Visit>{}
启动服务时报错:
Caused by: Unable to load configuration. - [unknown location]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
... 14 more
Caused by: Unable to find interceptor class referenced by ref-name userInterceptor - [unknown location]
解决方案 »
- WebService客户端
- SSH 整合 报空指针错误 求高手解决
- 将数据库中的二进制转换成dwg文件后,为什么不能预览?
- 如何学好EJB?
- 一个简单的hibernate 查询
- Tapestry的Submit组件问题
- acegi验证登录后, 不能跳转到指定页面的错误
- 高手快来啊!!!!struts 2.0+hibernate3.1+spring2.0问题(急)
- Unable to compile class for JSP:
- >>>from functools import reduce
- 200分求解:从OkHttp往http上移,对formBody拼接的在httpClient或HttpURLConnection中处理呢?
- Sping task定时任务 注解注入的jdbctemplate老是报空指针
改为
@ParentPackage("crm")
即可。
--> com.opensymphony.xwork2.config.entities.PackageConfig