rq2 2008-11-28 10:44
浏览 186
已采纳

关于struts2.1.2中codebehind插件---bug?

本人在用struts2-codebehind-plugin-2.1.2插件进行开发过程中遇到下面问题:



struts2.xml如下:
Xml代码 复制代码

   1. <struts> 
   2.  
   3.     <constant name="struts.codebehind.defaultPackage" value="test">  
   4.     <constant name="struts.codebehind.pathPrefix" value="/view/ftl/"> 
   5.   
   6.     <package name="test" extends="struts-default"> 
   7.         <interceptors> 
   8.             <interceptor name="metoken" class="com.test.core.web.struts2.TokenInterceptor"> 
   9.             <interceptor name="authority" class="com.test.core.web.struts2.AuthorityInterceptor"> 
  10.  
  11.             <interceptor-stack name="normalStack"> 
  12.                 <interceptor-ref name="metoken"> 
  13.                 <interceptor-ref name="authority"> 
  14.                 <interceptor-ref name="paramsPrepareParamsStack"> 
  15.             </interceptor-stack> 
  16.         </interceptors> 
  17.  
  18.         <default-interceptor-ref name="normalStack"> 
  19.  
  20.     </package> 
  21.  
  22. </struts> 

<struts>

<constant name="struts.codebehind.defaultPackage" value="test">
<constant name="struts.codebehind.pathPrefix" value="/view/ftl/">

<package name="test" extends="struts-default">
<interceptors>
<interceptor name="metoken" class="com.test.core.web.struts2.TokenInterceptor">
<interceptor name="authority" class="com.test.core.web.struts2.AuthorityInterceptor">

<interceptor-stack name="normalStack">
<interceptor-ref name="metoken">
<interceptor-ref name="authority">
<interceptor-ref name="paramsPrepareParamsStack">
</interceptor-stack>
</interceptors>

<default-interceptor-ref name="normalStack">

</package>

</struts>



使用零配置的时候,页面和action都能用 就是interceptor不起作用。还请大虾们帮忙啊~~~~~~~~~



使用的是struts2-core-2.1.2.jar struts2-codebehind-plugin-2.1.2.jar freemarker-2.3.12.jar

 

  • 写回答

1条回答 默认 最新

  • sorphi 2008-11-28 10:44
    关注

    是不是还少配置了
    struts.configuration.classpath.defaultParentPackage

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?