2017-07-07 2 views
0

J'essaie d'intégrer HDIV avec mon application Web en utilisant les barres HDIV 1.jarLe paramètre HDIV n'existe pas

Je rencontre l'erreur ci-dessous lorsque j'essaie de charger la page de connexion.

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

contrôles possibles je l'ai fait:

  1. essayé avec plus de struts- tag -el lib avec HDIV- tag -el lib
  2. essayé avec motif de mappage du filtre à toutes les URL

Je ne sais pas où je vais mal. Beaucoup de recherches ne me fournissent pas une solution appropriée. Toute orientation est très appréciée. Merci

Voici mes fichiers de configuration.

hdiv-config.xml. Je l'ai appelé comme 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> 

Répondre

0

Selon votre post, je vois deux solutions possibles:

  • Vous devez traiter l'URL signalée côté serveur en utilisant les balises personnalisées proposées par Struts 1 pour afficher les liens. De cette façon, Hdiv inclura le paramètre hdiv supplémentaire. Si l'URL est une page de démarrage (le point d'entrée de l'application) où l'utilisateur démarre la navigation (dans ce cas, vous ne rendez pas le lien), vous devez définir une page de démarrage dans la configuration Hdiv.

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

Cordialement,

Velasco Roberto (Hdiv sécurité)