struts2 ignore particular pattern

前端 未结 3 1112

I am using strust2 for my web application development. My struts.xml file will be like:



        
相关标签:
3条回答
  • 2021-01-07 05:50

    you can probably add exclude pattern in your struts.xml, something like

    <struts>
        <constant name="struts.action.excludePattern" value="appName/checking"/>
    </struts>
    

    read here and find excludePattern for more information.

    0 讨论(0)
  • 2021-01-07 05:52

    this could works:

         <!-- exclude pattern -->  
     <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/struts/*</url-pattern>
    </filter-mapping>
    

    an action exampe:

    0 讨论(0)
  • 2021-01-07 05:58
    <constant name="struts.action.excludePattern" value="appName/checking"/>
    

    the constant excludePattern explicit exclusions (since 2.1.7)

    0 讨论(0)
提交回复
热议问题