aspose file tools*
The moose likes JSP and the fly likes request timeout in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "request timeout in jsp" Watch "request timeout in jsp" New topic
Author

request timeout in jsp

vikhyath reddy
Greenhorn

Joined: Dec 07, 2008
Posts: 20
hello everybody , i am trying to set a request time-out (so that unauthorized users are blocked from logging into another user's account after they fail some 5 times)... any ideas ?


~ Happy coding ~
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Request timeout? Don't you rather mean that you want to block login for a certain time?
vikhyath reddy
Greenhorn

Joined: Dec 07, 2008
Posts: 20
yes exactly ! thanks for your response ... so how do i go about it ?
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
You can't implement it in a hack-safe way.

Best what you can do is to for example set a cookie, or to check the user's IP address, or to set a toggle in the session, etcetera. But an experienced hacker can easily go around that.
vikhyath reddy
Greenhorn

Joined: Dec 07, 2008
Posts: 20
thanks.. and what about denying all request for an amount of time instead of denying him forver ? how to implement that
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
With the cookie approach, just set the max age of the cookie. If the cookie isn't there anymore, then it has been expired. For the server side solutions, just store the current timestamp and compare against it in the subsequent requests.
Pixy
Greenhorn

Joined: Dec 19, 2008
Posts: 2
Session seems to be a good idea over cookies, for blocking any user after certain number of attempts.
I am not sure about what backend you are using, but you could create a table to maintain the blocked status and its limit through your application or even property file would suffice,
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

"Pixy", please check your private messages for an important administrative matter. Again.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: request timeout in jsp