0

hi
I want to create an application which contain servlet and jsp and also connected with database
but i only want that login page will be open from 05:00hr to 10:00 hr before and after nobody able to access/login the page
if they do that it reject the request
how it is possible

3
Contributors
4
Replies
13
Views
4 Years
Discussion Span
Last Post by stultuske
0

In login page you can check time if userid password is fine and time is between 05:00hr to 10:00 hr, allow user to access pages otherwise disallow

If there is no login page. You may put same check in all pages

0

You can put it in some common page that you include in all your pages. I am not sure about putting in tomcat configuration

0

why in your tomcat configuration? just because the users shouldn't be able to log in, doesn't mean your tomcat should stop working, right?
just configure your application or service right. your servlets run server side, so that should be "safe" (if you configure it decently, that is).
and add a check: onUserLogin() => if serverTime not between 5 and 10 (boundsIncluded) -> do not login and show message
and, if need be: when it becomes 10 -> force logout on all logged in users.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.