0

When accessing our website with an invalid action in the url followed by a valid action, web xml is not filtering it out. Below is an example.

https://portal.abcd.org/Enroll - Loading Enroll Page

https://portal.abcd.org/sdafj - Loading Page not found

https://portal.abcd.org/adasdada/Enroll - Not working

<filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/</url-pattern>
    <url-pattern>/RedirectForTesting</url-pattern>
    <url-pattern>/FAQ</url-pattern>
    <url-pattern>/TnC</url-pattern>
    <url-pattern>/Enroll</url-pattern>
</filter-mapping>
<error-page>   
    <error-code>404</error-code>
    <location>/WEB-INF/apppages/error_page.jsp</location>
</error-page>
<error-page>   
    <error-code>500</error-code>
    <location>/WEB-INF/apppages/Error.jsp</location>
</error-page>
RakeshS
  • 119
  • 1
  • 2
  • 13
  • You can redirect your error page to the action that handles error codes, not necessary to configure result codes in web.xml. – Roman C Jan 24 '17 at 23:48
  • @raksrockz Same requirment you can achive with this have a look http://stackoverflow.com/questions/23780282/how-to-create-custom-urls-with-struts2like-twitterwww-twitter-com-goodyzain – goodyzain Jan 25 '17 at 06:09

0 Answers0