Re: SV: FORM login, would like error page same as login page

2007-11-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ognjen, Ognjen Blagojevic wrote: > var results = regex.exec(window.location.href); Yeah, that's certainly not going to work when a server-side forward. I'm glad you found another solution! - -chris -BEGIN PGP SIGNATURE- Version: GnuPG

Re: SV: FORM login, would like error page same as login page

2007-11-16 Thread Ognjen Blagojevic
Hi Christopher, Christopher Schultz wrote: Please post the code that checks for this parameter. Here is the code: function getUrlParameter(name) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS

Re: SV: FORM login, would like error page same as login page

2007-11-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ognjen, Ognjen Blagojevic wrote: > Wilhelmsen Tor Iver wrote: > Yes, I'm using JavaScript. > > I beleive that JavaSrcipt it is okay, because when I try the page alone > (/login.html?err=1), it works just fine. Please post the code that checks for th

Re: FORM login, would like error page same as login page

2007-11-15 Thread Ognjen Blagojevic
Wilhelmsen Tor Iver wrote: to see what the real URL is when you expect it to use the error page; most likely that will be the URL of the resource that triggered the authentication in the first place. Yes, the url returned is http://localhost:8080/myapp/j_security_check So the parameters wer

Re: FORM login, would like error page same as login page

2007-11-15 Thread Wilhelmsen Tor Iver
> I beleive that JavaSrcipt it is okay, because when I try the page alone (/login.html?err=1), it works just fine. Thinking more about it, the form-error-page reference is just used server-side via internal include or forward to obtain content returned for a different URL: Since the page reference

Re: SV: FORM login, would like error page same as login page

2007-11-15 Thread Ognjen Blagojevic
Wilhelmsen Tor Iver wrote: So, I created login.html, with username and password fields, and if parameter err=1 is passed, then the error message is displayed. How do you pick up the parameter in the HTML? Using JavaScript? Remember *.html resources are usually not parsed server-side in any way.

SV: FORM login, would like error page same as login page

2007-11-15 Thread Wilhelmsen Tor Iver
> So, I created login.html, with username and password fields, and if parameter err=1 is passed, then the error message is displayed. How do you pick up the parameter in the HTML? Using JavaScript? Remember *.html resources are usually not parsed server-side in any way. --

FORM login, would like error page same as login page

2007-11-15 Thread Ognjen Blagojevic
Hi all, I'm using FORM login, and I'm trying to make error page looks the same as login page, with one extra error message. So, I created login.html, with username and password fields, and if parameter err=1 is passed, then the error message is displayed. My web.xml configuration follows: