Timed access restriction in jsp

Dear Friends,
While working on a website development, I've faced the following problem:-
I want to display a Webpage (written in HTML and JSP) in between a particular timing. [e.g. the page will be displayed in between 09:45 AM to 11:30 AM and again from 01:30 PM to 02:45 PM]. But except that particular duration, that page won't be displayed. Rather then an error page will be generated stating that you accessed that page in wrong time!! This task is essential for my project, but actually I don't know how to do it. Can anyone help me please!!! I'll be very greatful to all of those persons who can help me by giving advice or any type of suggestion.
Thanks in advance,
Abhinandan Banik

Here's an example of the filter :
package test;
import java.io.*;
import java.util.*;
import javax.servlet.*;
public class TimeFilter implements Filter {
  public void init(FilterConfig config) throws ServletException {
  public void doFilter(ServletRequest request, ServletResponse response,
    FilterChain chain) throws IOException, ServletException {
    int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
    // only service the request between 08:00 and 17:59
    if (hour >= 8 && hour <= 17) {
      chain.doFilter(request, response);
    // for other times, forward the request to someplaceelse
    } else {
      request.getRequestDispatcher("/someplaceelse").forward(request, response);
  public void destroy() {
}You will also need this in your web.xml :
<filter>
  <filter-name>TimeFilter</filter-name>
  <filter-class>test.TimeFilter</filter-class>
</filter>
<filter-mapping>
  <filter-name>TimeFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

Similar Messages

  • WRT54GX2 Timed Access Restrictions work too well

    I have set three access restrictions applicable to both a laptop (ethernet and wireless MAC addresses) and a desktop.  They all work the first time; however, once they shut off internet access, they don't permit reconnection at the time they should.  The time functions all seem to be set correctly and working properly.  Is it possible that I am somehow "overloading" by having three separate MAC addresses for each access policy?  Should I limimt each policy to one MAC address?  Thanks.

    Yep, I have the same problem.  No answer yet on the thread I opened.  I have 2 policies with 2 MAC addresses from a wireless network listed.  It locks them at the right time, but when the morning comes, they remain locked.  It didn't work the first 2 days, then it worked for 2 days, then it failed this weekend again.  Just logging into the router doesn't solve it.  Either a reboot (pull the power cord and plug it back in) or a re-save of the config (without even making any changes) also makes access available again.
    It has to be a bug.  The config is pretty cut and dried.  Of course, it could be a clock problem if the router doesn't know what time it is!  Not sure exactly how to troubleshoot that one.  I've checked the logs, and they have the right time stamp in them, so I don't think this is what's happening.

  • Timed Access not working on Airport Extended Network

    I've had an Airport Extreme wirless networking working fine except for some wifi disconnects at the far end of my house.  So I bought an Airport Express to extend the network.  I'm got the Airport Express configured and running an extended network.  Everything shows "green" in the AirPort Utility, but it required me to set the Timed Access option to "Not Enabled".  If I enable Timed Access on the Airport Extreme, the Airport Express dissapears from the AirPort Utility and starts flashing the amber light.
    Is it possible to configure an extended network that continues to support the Timed Access restrictions?

    Well,
    I succeeded in making it work. Yes it can work!!
    Yesterday I had a brainwave. You have to put the mac adress of the airport that extends your network also in the timed access table.
    My timetable looks like this:
    default: access from 06:00 - 22:00
    Devices that have an exception:
    My ipad: every day, all day
    Airport Express: every day, all day
    The trick is that you have to use the mac adress of your airport express of the WiFi interface. The airport has 2 mac adresses one for the wired and one for the WiFi. First I used the ethernet mac adress.
    So now it works like a charm.
    Success!!!!!!!
    BTW: You only have to enter the timed access rules in one airport. It propagates further to the "extenders"
    Message was edited by: jeroen.vd.poll

  • Access restrictions timing off by 1 hour

    I don't know if anyone else is experiencing this problem.  I have set access restrictions on my WRT610N router and they execute an hour earlier than set.
    I checked the time zone settings, the system clock and all seem correct. I have a rule that is supposed to turn off access to the Internet at 11:55pm. However, the rule gets executed at 10:55pm.
    This was happening on my first WRT610N which was also dropping network connections. So, I returned that unit and got a replacement.
    The new unit does not drop connections but has the same timing problem.  The only solution I have found is to change the time zone to the next one that is 1 hour behind my time zone.
    Please let me know if anyone else has experienced this same situation.

    My ISP is on the same town as I am. The information they are supplying appears to be correct as my WRT54G uses the same information and its rules execute properly.
    I think there is a problem with the WRT610N. My solution is temporary I hope that Linksys will fix this problem. 

  • Airport Utility Timed Access Control does not allow/restrict access to wireless clients per the time set.

    I have been trying to setup Timed Access Control in Airport Utility and it does not seem to be working correctly. 
    In Airport Utility from Edit Timed Access Control I Enter a name for my device (iPad/iPhone any device), enter my mac address, set time for Everyday and use default Between 9:00 AM and 5:00 PM, save and then update. When I go to my device iPad iPhone etc. I still have access even when it is after the time set, 5:00PM.  If I set no access it will restrict access also I set a time between 2:00 PM and 5:00 PM and access was restricted.  It doesnt seem to matter what the device is.  I know that the MAC Adress is set correctly.  It seems like an issue with the Utility, possibly time miss match or something.  Not sure if I am missing something or if this Utility just has flaws. Please Help.

    I changed the default to (no access) and set an entry for my test device (an iPad) to "Everyday Between 9am to 5pm.  The iPad was still able to gain access to the network. 
    Something else to note, if I try to edit the time of an entry it gives me an error on my MBP "Invalid value", "The value for “Timed Access Control” is invalid."  This happens even if I delete a digit (number or letter in the time field) and replace with the exact same. Not sure if the two are related. I have tried to edit access from my iPad.  I don't get any errors but I still don't get the expected results.  I called Apple to try and get Tech support but they were not much help. Thanks again.

  • 10.1.3.4 - how to secure access on a jsp page ?

    I have a simple jsp page that takes in some user values and then kicks off a workflow. I want to restrict the access on the jsp page so that only users of a certain group can use it. right now it is completely open and anyone can just go the page and start of a transaction.

    found an article on this
    http://www.oracle.com/technology/products/jdev/howtos/1013/adfsecurity/adfsecurity_10132.html

  • Timed Access controlling Main and Guest Network

    I have a Time Capusle 4G running software v7.5.2. I am running a Guest Network as well as a closed network.
    In the Timed Access window i have default set to "no access". Then, all the computers that are allowed access to the main network are on the list. My guest network is broadcasting but when a user tries to connect to it, they get an "Unable to connect" message. If I change the default access in Timed Access to "Everyday", users are then able to connect to the Guest network again.
    Obviously, this is a bug/missing feature and has been for several software revisions. I don't want people accessing the main network that aren't on the timed access list. However, I still want guest users to access the Guest Network, without using MAC address filtering on the Guest Network.
    It looks to me that the Timed Access window is controlling the restriction of the Guest and Main network. Which renders the Guest Network feature pretty much useless.
    Hopefully this will be addressed in the near future. If other people are experiencing this problem, Please let me know.
    -Ghost

    It looks to me that the Timed Access window is controlling the restriction of the Guest and Main network.
    Your observation is correct. Access control using Timed Access is an ALL or NOTHING feature for both the Main and Guest networks. The Guest network is basically a VLAN function.

  • Problem with access restriction

    I have about 50 to 80 users under my internet connection and i used the router 2500 and make there repeater of the single connection but i want to restrict many of the user on interner and some on timely but is not possible with this version of product, what can i do house, or what software do you suggest for me to use with this to restrict the internet access on this network. 
    Again, i try to use switch sf100-24 becos of the numbers of the cable to use that is more than 4 as we have only 4 port on the router for ethernet but if i connect it after few second it will make all the connection saying 'unidentify network' and it will not function again what can i do to solve this problem too please!!! help me house

    Hi, you might perhaps consider getting a gigabit switch in order for those devices to be able to work with access restriction.

  • With Timed Access List on, Guest users cannot access Guest network.

    I have a ABS with 7.5 version. In the Timed Access window i have default set to "no access". Then, all the computers that are allowed access to the main network are on the list. Then i have the main network hidden. My guest network is broadcasting but when a user tries to connect to it, they get a "Unable to connect". If I change the default access in Timed Access to "Everyday", users are then able to connect to the Guest network again.
    Obviously, this is a bug. I don't want people accessing the main network that aren't on the timed access list. However, I still want guest users to access the Guest Network.
    It looks to me that the Timed Access window is controlling the restriction of the Guest and Main network, when it should only be controlling the Main only.
    Hopefully, apple has noted this issue and will be fixed on the new update. If other people are experiencing this problem, Please let me know.
    -Ghost

    Apple just updated the airport to 7.5.1. But there is still a problem with the the guest network not allowing access. If the "Unlimited" is set to "No Access" in the access list it prevents anybody from accessing the guest network. It should only deny your Main wireless Network.
    In other words, the Access List is controlling the access for both wireless networks(Guest and Main network)
    Either apple needs to create two Access Lists, One for Main network, and One for guest network. Or just have to option to choose which Network you want to restrict leaving the second one open for all.
    -Ghost

  • Verifying access to each jsp

    Hello!
    I'm developing a web app in which users need to be authenticated.
    Users have different profiles and, according the the profile, they may or may not have access to certain pages.
    Some pages may be accessed by all user profiles while other pages may only be accessed by one or two profiles..
    After the user logs on, I keep the profile in the session.
    What is the best way to validate access to each jsp? My app has a big tendency to get bigger and bigger and to have more and more jsps, so I would like the solution to address this issue.
    Any help is appreciated...
    Nuno Geraldes

    You can set up declarative security in your web.xml file.
    Basically you have users and roles.
    You can restrict access to html/jsp pages based on the role a user is logged in on.
    Heres a basic extract from a project: sets up an admin folder, only available to those in the admin role.
    This security is part of the servlet spec, and should be supported by all servlet containers.
    For Tomcat, you may find this page on setting up realms useful.
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html
    <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
          <form-login-page>/login/login.html</form-login-page>
          <form-error-page>/login/loginerror.html</form-error-page>
        </form-login-config>
      </login-config>
      <security-constraint>
        <web-resource-collection>
          <web-resource-name>Admin Application</web-resource-name>
          <url-pattern>/admin/*</url-pattern>
          <http-method>GET</http-method>
          <http-method>POST</http-method>
          <description>Administration Application</description>
        </web-resource-collection>
        <auth-constraint>
          <role-name>admin</role-name>
          <description>Administrators Only</description>
        </auth-constraint>
      </security-constraint>Check out the J2EE tutorial Chapter 32 on Security.
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security.html#wp268799
    Hope this helps,
    evnafets

  • Problems with Timed Access on Airport Extreme n & Express

    Hi
    I have recently upgraded to an Apple network at home, with good results. The extreme n is my main router, connected to a Netgear modem, with an express n used to extend the network across the house.
    This all works fine, except for one problem - the timed access. I am trying to restrict the access on my son's iPod touch without success.
    The set up is as follows:
    Default - no access
    All other machines - all day everyday
    My son's iPod touch - weekdays restricted to evenings and weekends a more relaxed restriction.
    The problem is this - his iPod touch allows him to access at any time. If I take his iPod touch off the timed access list, the default works i.e. he can't connect to the network. If I apply the settings again, he has free access.
    I've tested his restrictions on my iPhone and they apply perfectly - doh!
    Any suggestions please?
    Thanks
    Paul

    Found the answers myself
    MAC address is a unique address (looks like 00:05:92:a6:3a:70) that each network card on a Mac or PC has. To find it, go to System Prefs/Network/Firewire. On the PC use the Start-button and write the command ipconfig_/all to get the physical address. Add one line for each client (Mac or PC) in the time access configuration for the Airport Base Station, and here you can limit the access time for each client.
    Message was edited by: Helge Krabye

  • Tomcat - Directory Access Restrict

    How do i restrict users from entering the image/text files path directly in the browser.
    my web application has restrictions to jsp/servlet pages, wherein we ask for username and password which will chk and db and then authenticate.
    but when an image or text file in a particular directory is accessed thru the web i have to restrict. how do i do that.
    to be more clear
    if i access
    https://www.somename.com/index.jsp
    it will ask for login information and only then other jsp pages can be accessed.
    but
    https://www.somename.com/images/logo.jpg
    if i type directly this image will appear, but i need to restrict, how to do that in Tomcat.
    PraDz

    GRRR,
    I found the spot to disconnect from wireless networks on logout. I also set it up to not automatically join preferred networks. This solved my problem.

  • How do I set up timed access control for a time past midnight

    I would like to set up timed access control for a number of my devices that would stretch past midnight...   An open network from 6AM to 2AM - effectively only blocking access from 2AM tp 6AM in the morning....
    Any notion on how to do this?  the timed factily does not like the setting to enable 6A to 2A, says the times are invalid. 
    Setting up timed access from 6AM to 11:59P, then doing another from 12A to 2A causes a service "hiccup" of 1 Minute.

    Set up each device as follows:
    Everyday........Between.......6:00 AM and 11:59 PM
    Add a second rule for each device that will state....
    Everyday.....Between.......12:00 AM and 2:00 AM
    You might think that there would be a one minute break between 11:59 PM and 12:00 AM, but that will not be the case, at least on every AirPort that I have ever programmed..  Reason.....11:59 is really 11:59:59:59 turning off at 12:00 AM.  But, you have a second rule to allow access at 12:00 AM, so the AirPort will be "on" at the same time the first rule ends, so there will be no break.
    If you really want the second rule to turn the AirPort "off" at 2:00 AM.......then set that time for 1:59 AM. If you set the rule for 2:00 AM, then AirPort will really turn off at 2:01 AM.

  • WRT54G2 and WRT54G locks-up (freezes) when blocking web sites using Access Restrictions

    I am convinced that a few Linksys routers such as WRT54G2 and WRT54G have a major issue when blocking web sites using Access Restrictions (Internet Access Policy). After a few hours of internet access by 15 wired users the Linksys locks-up and blocks all internet web access. The only solution is to restart the power on the router.
    We are currently using a Linksys WRT54G2 v1 (firmware 1.0.04). We upgraded the WRT54G2 v1 firmware to the latest 1.0.04 version which did not resolve the issue.  NOTE: We were previosuly using a a Linksys WRT54G v1.1 (firmware 4.21.1) until the power supply blew a week after we started blocking web sites using Access Restrictions (Internet Access Policy).  
    Basically, we have a T1 internet connection and a hub connected to the Linksys router. We are trying to block several web sites such as facebook, myspace, etc. for 15 wired users. We do not use wireless connections.
    This is the 2nd time it happened with 2 different models.
    Please help ASAP.
    Thank you,
    Lance
    (Mod note: Edited post. Some parts off topic.. Thanks!)

    Also,  you have already upgrade/re-flash the firmware of your Linksys Router you need to reset and reconfigure your router from scratch. Press and hold the reset button for 30 seconds...Release the reset button...Unplug the power cable from your router, wait for 30 seconds and re-connect the power cable...Now re-configure your router...

  • How to configure CLI/DNIS based access restriction in 5.3 ?

    Hi,
    does anybody have an idea how the setting
    define CLI/DNIS-based access restrictions which is defined in ACS v. 4.2
    can be configured in acs 5.3 ?
    in v. 4 for every user in a group with 40 members  a different CLI is defined for each. How can I configure that in version 5.3 ?
    any help as always much appreciated!

    The equivalebt to NAR functionality can be found at:
    Policy Elements > Session Conditions > Network Conditions > End Station Filters
    Can then define an object with a set of CLI values
    These objects can then be used in policy conditions. So can create a condition with a set of CLI values and then match in authorization policy for values that are included in this set and set authorizations accoridngly
    Not sure if this is your use case but hopefully may be a start

Maybe you are looking for