A robust starter web application to ease Java webapp development.

Home | Tutorials | Demos | Issues

 « Return to Thread: Login

Login

by taltun :: Rate this Message:

Reply to Author | View in Thread

Hi,

I'm using Struts 2 Moduler. I hope some can help on my big issue.

I have 2 pages xxx.html and yyy.html.

Each have a login form posting to j_security_check.

I want each have a different "authentication-failure-url" in case if the login is failed.

Currently, I have below tag in my security.xml file:

<form-login login-page="/xxx.html" authentication-failure-url="/xxx.html?error=true" login-processing-url="/j_security_check"/>

This works great!

But if I add another e.g.

<form-login login-page="/yyy.html" authentication-failure-url="/yyy.html?error=true" login-processing-url="/j_security_check"/>

This second tag doesn't work! Whenever a login form is used to be proccessing by j_security_check
the first defined <form-login.. tag is used.

How can I have 2 <form-login... tags for each page in security.xml or is there other solution ?

-tuncay

 « Return to Thread: Login