• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Login problem

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I'm new to JSP & Servlets and i'm facing the below issue.

In our product, there is a requirement like if HTTP 404 error is occuring, we've to direct the user to an error page. The error page should contain an error message and an link to the homepage. If the user is already logged in and if the session is valid, direct to home page or else to the login page.

I've implemented this by creating an error.jsp page and putting it in <error-page> tag of the web.xml.

Now please consider the below scenario.

1. I log into the application and wait till the session to time out.
2. Once the session is timed out, i click on a link to download an excel document.
3. Since the session has timed out, it directs me to the login page.
4. I give the proper user credentials and hit login button.
5. Pop-up window comes asking to save or open the document.
6. I hit cancel on the pop-up window. [The url is still pointing towards the excel document]
7. I'm still in the login page and i hit login button again with proper credentials.
8. It directs me to error page and from there to the home page through the link i provided.

Perfect!!

Now the problem is, if in Step 7 i give wrong credentials and hit login button, it still directs me to the error page and from there to the home page. This should not happen.

Why is it happening like this? Why is the user credentials not validated? What is the solution for this?

Please help me out. Thanks a lot!!

Best regards
Shenaz
[ December 18, 2008: Message edited by: Shenaz Assu ]
 
I like tacos! And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic