mercredi 20 avril 2016

Jaas Security redirect to own page.

I have a Jaas security implemented on a web application.

I need some help about this:

This is my web.xml configuration to login and error page:

<security-constraint>
<display-name>SECURITY/display-name>
<web-resource-collection>
  <web-resource-name>INICIO</web-resource-name>
  <url-pattern>/something/*</url-pattern>
  <http-method>GET</http-method>
  <http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>

  <role-name>USER</role-name>

</auth-constraint>
<user-data-constraint>
  <transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>

<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
  <form-login-page>/login/inicio.jsp</form-login-page>
  <form-error-page>/login/login-error.jsp</form-error-page>
</form-login-config>

Then, when i want to go to url "/something/" the web automatically redirect to login. But when i login and it's successfully, the web takes me to url "/something/".

How i to do that the web redirects to another page that is not the requested?

Thanks!




Aucun commentaire:

Enregistrer un commentaire