Is there a way to specify the extension of a struts action?
Example:
I'd like to change it to
I want to do this because I need to get rid of the security constraint for this action (only this one). This action must be accessible for everyone without going trough the login page (the user should not get the login page if he clicks on this link)
So, I was thinking to solve my problem by adding another security-constraint section into web.xml.
I'm not sure if this could work. Is there a way to tell struts that the action /Card/Provisioning/Create should be /Card/Provisioning/Create.web instead of Create.do ?
Thanks
struts-config.xml:
<action input="/Card/Provisioning/CreationInput.jsp" name="cardForm" path="/Card/Provisioning/Create" scope="request" type="com.gemplus.preview.gui.card.ProvisioningCreateAction" validate="true">
<forward name="forward" path="/Card/Provisioning/CreationResponse.jsp"/>
</action>
web.xml:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.web</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>With auth-constraint</web-resource-name>
<url-pattern>*.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>serviceManager</role-name>
<role-name>csr</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Without auth-constraint</web-resource-name>
<url-pattern>*.web</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
</security-constraint>
Example:
I'd like to change it to
I want to do this because I need to get rid of the security constraint for this action (only this one). This action must be accessible for everyone without going trough the login page (the user should not get the login page if he clicks on this link)
So, I was thinking to solve my problem by adding another security-constraint section into web.xml.
I'm not sure if this could work. Is there a way to tell struts that the action /Card/Provisioning/Create should be /Card/Provisioning/Create.web instead of Create.do ?
Thanks
struts-config.xml:
<action input="/Card/Provisioning/CreationInput.jsp" name="cardForm" path="/Card/Provisioning/Create" scope="request" type="com.gemplus.preview.gui.card.ProvisioningCreateAction" validate="true">
<forward name="forward" path="/Card/Provisioning/CreationResponse.jsp"/>
</action>
web.xml:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.web</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>With auth-constraint</web-resource-name>
<url-pattern>*.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>serviceManager</role-name>
<role-name>csr</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Without auth-constraint</web-resource-name>
<url-pattern>*.web</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
</security-constraint>