首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不存在HDIV参数

不存在HDIV参数
EN

Stack Overflow用户
提问于 2017-07-07 04:36:26
回答 1查看 334关注 0票数 0

我正在尝试使用HDIV struts 1.jar将HDIV与我的web应用程序集成

当试图加载登录页面时,我会遇到以下错误。

代码语言:javascript
复制
(self-tuning)'][][](org.hdiv.logs.Logger) - HDIV_PARAMETER_DOES_NOT_EXIST;/abc/def/index.do;_HDIV_STATE_;;;127.0.0.1;127.0.0.1;anonymous;

可能是我做的检查:

  1. 尝试在HDIV el标签库中添加struts-el标签库。
  2. 尝试使用过滤器映射模式到所有url

不知道我哪里出了问题。许多搜索并没有给我一个正确的解决方案。任何指导都是非常感谢的。谢谢

这是我的配置文件。

hdiv-config.xml。我将其命名为struts-config-hdiv.xml。

代码语言:javascript
复制
<hdiv:config excludedExtensions="css,png,gif,jpg,html,js" protectedExtensions=".*.do">
</hdiv:config> 

<hdiv:config>
    <hdiv:startPages>/index.html</hdiv:startPages>
    <hdiv:startPages>/fsm/efsm/index.do</hdiv:startPages>
</hdiv:config>

<hdiv:config errorPage="/fsm/jsp/tiles/common/ErrorPage.jsp">
        <hdiv:startPages>/index.html</hdiv:startPages>
        <hdiv:startPages>/fsm/efsm/index.do</hdiv:startPages>
</hdiv:config>

<hdiv:editableValidations registerDefaults="true">
    <hdiv:validationRule url=".*"></hdiv:validationRule>
</hdiv:editableValidations>   

<hdiv:config showErrorPageOnEditableValidation="true">
</hdiv:config> 

<hdiv:config maxPagesPerSession="5">
</hdiv:config> 

<hdiv:config avoidValidationInUrlsWithoutParams="true">
</hdiv:config> 
代码语言:javascript
复制
                         ` web.xml
代码语言:javascript
复制
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/struts-config/struts-config-hdiv.xml</param-value>
</context-param>

<filter>
    <filter-name>ValidatorFilter</filter-name>
    <filter-class>org.hdiv.filter.ValidatorFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>ValidatorFilter</filter-name>
    <url-pattern>*.do</url-pattern>
</filter-mapping>

<listener>
   <listener-class>org.hdiv.listener.InitListener</listener-class>
</listener>

<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>
        org.apache.struts.action.ActionServlet
    </servlet-class>
    <init-param>
        <param-name>config</param-name>
        <param-value>
            /WEB-INF/struts-config/struts-config-default.xml
        </param-value>
    </init-param>
    <init-param>
        <param-name>config/hdiv</param-name>
        <param-value>
            /WEB-INF/struts-config/struts-config-hdiv.xml
        </param-value>
    </init-param>
    <init-param>
        <param-name>debug</param-name>
        <param-value>3</param-value>
    </init-param>
    <init-param>
        <param-name>detail</param-name>
        <param-value>3</param-value>
    </init-param>
    <init-param>
        <param-name>validating</param-name>
        <param-value>false</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
</servlet-mapping>

<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>

 <taglib>
    <taglib-uri>/WEB-INF/tld/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/tld/hdiv-html.tld</taglib-location>
</taglib>
<taglib>
    <taglib-uri>/WEB-INF/tld/struts-nested.tld</taglib-uri>
    <taglib-location>/WEB-INF/tld/hdiv-nested.tld</taglib-location>
</taglib>
<taglib>
    <taglib-uri>/WEB-INF/tld/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/tld/hdiv-logic.tld</taglib-location>
</taglib> 
<taglib>
    <taglib-uri>/WEB-INF/tld/struts-html-el.tld</taglib-uri>
    <taglib-location>/WEB-INF/tld/hdiv-html-el.tld</taglib-location>
</taglib> 
<taglib>
    <taglib-uri>/WEB-INF/tld/struts-logic-el.tld</taglib-uri>
    <taglib-location>/WEB-INF/tld/hdiv-logic-el.tld</taglib-location>
</taglib> 

` pom.xml

代码语言:javascript
复制
<dependency>
<groupId>org.hdiv</groupId>
    <artifactId>hdiv-config</artifactId>
    <version>3.3.0</version>
</dependency>
<dependency>
    <groupId>org.hdiv</groupId>
    <artifactId>hdiv-struts-1</artifactId>
    <version>3.3.0</version>
</dependency>
EN

回答 1

Stack Overflow用户

发布于 2017-07-11 16:44:09

根据您的帖子,我看到了两种可能的解决方案:

  • 您必须使用Struts 1提供的自定义标记在服务器端处理报告的URL以呈现链接。这样,Hdiv将包含额外的hdiv参数。
  • 如果URL是用户开始浏览的起始页面(应用程序的入口点)(在这种情况下不是呈现链接),则必须在Hdiv配置中定义起始页。 XXX网址XX

致以敬意,

罗伯托·贝拉斯科(Hdiv Security)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44962629

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档