2017-07-07 452 views
0

我想HDIV使用HDIV我的Web應用程序集成支柱1.jarHDIV參數不存在

我試圖加載登錄頁面時,會遇到下面的錯誤。

(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. 試着用另外struts- -el標記庫與HDIV- -el標記庫
  2. 與過濾器映射模式嘗試所有網址

不知道我哪裏出錯了。許多搜索沒有爲我提供適當的解決方案。任何指導,高度讚賞。謝謝

這是我的配置文件。

hdiv-config.xml。我把它命名爲的struts-config-hdiv.xml

<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> 

` 的web.xml

<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

<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> 

回答

0

根據您的文章我看兩種可能的解決方案:

  • 您必須使用Struts 1提供的自定義標記處理服務器端報告的URL來呈現linksr。這樣Hdiv將包含額外的hdiv參數。

  • 如果URL是用戶開始瀏覽的起始頁面(應用程序的入口點)(在這種情況下,您沒有呈現鏈接),則必須在Hdiv配置中定義起始頁面。

    <hdiv:config> 
    <hdiv:startPages>XXX the URL XX</hdiv:startPages> 
    

問候,

羅伯託·貝拉斯科(HDIV安全)