How to deny an ip to visit webapp and redirect to a specific page in Tomcat

Hello,
I need to use tomcat to deny some ips:
<Context path="" docBase="${catalina.home}/webapps/ROOT">
     <Valve className="org.apache.catalina.valves.RemoteAddrValve" deny="202.106.186.*,202.108.36.*,202.108.44.*,202.108.45.*,202.108.5.*,202.108.9.*,220.181.12.*,220.181.13.*,220.181.14.*,220.181.15.*,220.181.28.*,220.181.31.*,222.185.245.*,202.165.100.*,220.181.19.*,159.226.50.*,202.108.11.*,202.108.22.*,202.108.23.*,202.108.249.*,202.108.250.*,61.135.145.*,61.135.146.*,64.124.85.*,61.151.243.*,202.165.96.*,216.239.33.*,216.239.35.*,216.239.37.*,216.239.39.*,216.239.51.*,216.239.53.*,216.239.55.*,216.239.57.*,216.239.59.*,64.233.161.*,64.233.189.*,66.102.11.*,66.102.7.*,66.102.9.*,66.249.64.*,66.249.65.*,66.249.66.*,66.249.71.*,66.249.72.*,72.14.207.* ,61.135.152.*,65.54.188.*,65.54.225.*,65.54.228.*,65.54.229.*,207.46.98.*,207.68.157.*,194.224.199.*,220.181.8.*,221.239.209.*,217.212.224.*,219.133.40.*,202.104.129.*,61.135.157.*,219.142.118.*,219.142.78.*,61.135.132.*,220.181.26.*,220.181.19.*,61.135.158.*,66.196.90.*,66.196.91.*,68.142.249.*,68.142.250.*,68.142.251.*,202.165.102.*,202.160.178.*,202.160.179.*,202.160.180.*,202.160.181.*,202.160.183.*,72.30.101.*,72.30.102.*,72.30.103.*,72.30.104.*,72.30.107.*,72.30.110.*,72.30.111.*,72.30.128.*,72.30.129.*,72.30.131.*,72.30.133.*,72.30.134.*,72.30.135.*,72.30.216.*,72.30.226.*,72.30.252.*,72.30.97.*,72.30.98.*,72.30.99.*,74.6.74.*,202.108.4.*,202.108.4.*,202.108.33.*,202.96.51.*,219.142.53.*"/>
</Context>
this ip is some spiders, but my manager need me to redirect those spiders to a specific page like index.jsp (which is not at the same tomcat server).
It is very appreciated if you could give some advise,Thanks a lot!

Implement a Filter which compares HttpServletRequest#getRemoteAddr() with the blacklist and map this filter on /*.
You can issue a redirect using HttpServletResponse#sendRedirect().

Similar Messages

  • How do I set a Phase Listener to only run for a specific page?

    How do I set a Phase Listener to only run for a specific page?
    I understand that a Phase Listener runs for ever page in the application, however I want a phase listener to only run for one page at the beginning of the application.
    I discovered I can't use a Filter, because the JSF Application instance always returns null.
    Thus, I thought a Phase Listener would be a good approach.
    Thoughts?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I have moved forward with checking the requested URI...
    (shivers)
    Thanks,
    --Todd                                                                                                                                                                                   

  • How do I open with an animated gif and then go to home page?

    I apologize for the newbie question, but I would like to have
    an animated gif intro to a web page. Is it possible to have the gif
    play and then go to the index file? Or do I need to insert the gif
    into an index file and save the home page as something different?
    If so, how do I get it to go to the home page automatically?
    Any help is appreciated.

    >I apologize for the newbie question, but I would like to
    have an animated
    >gif
    > intro to a web page.
    This is called a 'splash page'. To do it, you'll make your
    default home page
    (index.html/default.html/whatever) this splash page, then
    you'll have then
    sent to whatever other page you want it to go to...either via
    a HREF or a
    META REFRESH tag.
    You can't actually time the refresh to coincide with the gif
    finishing it's
    animation, though. For that, you'd have to use Flash
    animation.
    But keep in mind that this technique is pretty much frowned
    upon these days.
    It's an unecessary barrier betwen your users and your content
    and is seen by
    many as a rather dated/amateur technique.
    -Darrel

  • I have chosen a persona, but when I start up Firefox, Mozilla start page with Google shows, and persona is just barely visible only in the toolbar area. How do I get the persona to show, and not Google start-up page?

    I checked out the Mozilla Personas, saw one I liked, and added on. When I start Firefox, the Mozilla start-up page shows as usual with Google on it. The Persona I chose barely shows, and only in the Toolbars area at the top of the screen. Can I modify the start-up page to not show Google, and access Google another way, so that my Persona will show on the whole start-up page?
    == This happened ==
    Every time Firefox opened
    == I added-on Persona

    As you can see from the [http://support.mozilla.com/en-US/kb/Using+themes+with+Firefox using themes with Firefox] article, personas are "''lightweight themes that can change the color scheme and background image of the Firefox toolbars''" and they wouldn't change the webpages.
    If you don't like seeing Google as your home page you might want to look at [http://support.mozilla.com/en-US/kb/How+to+set+the+home+page how to set the home page] and change it.
    Finally Firefox 3.5.x will be maintained with security and stability updates until August 2010, so you might want to [http://support.mozilla.com/en-US/kb/Updating+Firefox update to a newer version].

  • How can I take a very large gif and print it over many pages?

    I have a gif image that, if printed, comes out all compacted (read: much too small) on one page.  It is so small that it cannot really serve as a poster that I want to hang in my classroom.
    My desired result is to take the image and somehow split / divide it so that I can print it over multiple pages, and the image be properly sized, which I can then connect to make a poster.
    Any ideas how to get this done with Fireworks?
    Thanks all!  :-)

    Illustrator is good for this. Its Print dialog allows for page tiling with adjustable overlap and includes a thumbnail preview.
    You can print from Fireworks, but it relies on the native print options of your operating system, which may or may not allow you to print a single image across multiple pages.

  • On macbook air how do I get out of guest user and back to my login page.  I'm stuck.

    How do I get out of guest user on mac book air and back to my login?

    Log out then from the login screen select your user account.

  • How do I link a reference point in one PDF to a specific page in a different PDF? I want it to open link in a new window AT the specific page.

    I have a paper with multiple reference points that I need to link to 3 other pdfs. Each time I create a link in the master PDF, I need to open a file in a new window and point to a specific page in the other pdf. I cannot get it to work.

    Hmmmm, just tried that and used the magnify glass to capture the specific page in the second pdf, but when I tried the link, it doesn't open a new window, it sits within the original pdf and I can't go back to the page I need to. What am I missing/
    [email signature removed]

  • How to go to specific page

    I have a fill-out form on the web. When a user hits the submit button and there is an error on the form, I am displaying an error message to the user. How can I make the content of the pdf go to the specific page where the error field is located? I know the page of all possible errors, but I do not know how to make the PDF go to a specific page. Please help!

    If you knw of an object on the target page (usually the first field on the page), then you can use xfa.host.setFocus("PageX.FieldName"). If you use the method you mention then you will go to that page but the cursor will not be in any field. The user will still have to click in a field to start typing.
    Make sense?
    Paul

  • How can i get my money back on my visa card and delet my song?

    i need to now how can i get my money back on my visa card and delet the song?

    All sales are final

  • HT1311 how to change the payment from visa to none payment iPhone 4S

    how to change the payment from visa to none payment
    iPhone 4S

    martinimartini wrote:
    I have the same problem. I used Pay Pal payment before but Pay Pal limited my account so I can only use Pay Pal until after 180 days according to their specific regulations. I also do not have any credit card. How am I supposed to pay for my Skype that I have been using since start of Skype. I really need outgoing calls.  Martin
    Hi,
    As I understand you have a restriction on your PayPal account, unfortunately this is something Skype can't help you with.
    But you can try alternative payment methods: www.skype.com/intl/en-us/prices/ways-to-pay/
    Another option is to let your friend set up Skype Manager account, purchase credit there and allocate it to you: https://support.skype.com/en-us/faq/FA10519/What-is-Skype-Manager-and-how-does-it-work
    Andre
    If answer was helpful please mark it with Kudos and if issue is resolved mark it with solution. This will help other users find this answer more easily. Thanks in advance!

  • HT1918 plz i want help , how can i use credit card visa , im try to fill blank no. card information when i finish appear me msg ( the payment card you entered is not valid in israel p;ease provide avalid payment card for israel , im from palestine ) plz s

    plz i want help , how can i use credit card visa , im try to fill blank no. card information when i finish appear me msg ( the payment card you entered is not valid in israel p;ease provide avalid payment card for israel , im from palestine ) plz solutio?

    Oh thank god i am not the only one with this problem. It started with me on Saturday (aug 28) and still, no solution.
    I live in the border with the USA so i’ve been using my itunes account with a USA debit card and then it started with that **** declined CC problem =S
    The funny thing is that i’ve been trying to change countries, setting my account to Mexico and it would still say that the CC are declined. Tried 2 USA cards and 2 Mexican cards, no results =S
    Wanna read something funny. I even tried to create a brand new account based in Mexico, with another email address and it still wouldn’t let me, tells me my cards are not valid……..the **** apple!!! i cannot update any app and i just got my iphone 4 on friday last week and i am dying to try new apps.
    So far I’ve sent 2 emails and still no **** solution. At least i am not alone =’(

  • How can I specify SMTP Email Server userID and password when using Email VIs?

    How can I specify SMTP Email Server userID and password when using Email VIs included in Internet Toolkit?

    Hi,
    A similar question was posted on Discussion Forums soem time back. Please see the link below.
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000C7B00000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
    You would find the last post in the above thread quite useful where it has a link to OpenG code. I am also copying that link for your reference.
    http://www.openg.org/tiki/tiki-index.php?page=OpenG+Internet+Connectivity+Tools
    Please feel free to respond to this post with any questions/comments you may have.
    Regards,
    Ankita A.
    National Instruments

  • HT201363 I have an other Visa card. How can I update this new visa so that I can buy and update apps.

    I have an other Visa card. How can I update this new visa so that I can buy and update apps.

    Change Payment Information
    Settings>iTunes and App Stores>Apple ID>View Apple ID>Sign-in>Payment Information

  • HT2534 It doesn't have "NONE" in the process of Billing information. (It have Visa, Master and AMEX only.) How can I do. I don't have credit card for fill in. I also don't want to buy anything in App store.

    It doesn't have "NONE" in the process of Billing information. (It have Visa, Master and AMEX only.) How can I do. I don't have credit card for fill in. I also don't want to buy anything in App store.

    Follow the directions exactly, step by step. It does work.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card

  • How do I set up another visa card for payment

    How do I set up another visa card for payment ?

    Hi,
    Please refer to the KB link:-Remove credit card information from an Adobe Account.
    Regards,
    Nakul

Maybe you are looking for

  • HT1923 I can't delete the Apple folder in Common Files

    My computer would not recognize my iPhone.  I tried the troubleshooting tips found online, uninstalling everything in order.  When verifying all files had been removed, I could not delete the Apple folder in Common Files as it says the folder or a fi

  • Left channel not working--it's a logic problem, but I can't debut it! HELP!!!

    I'm using a SB Audigy SE card on my XP machine. In the past, I've made good music files from CDs and records (remember those?), but I have not used the thing in about 18 months, and now I'm having a weird problem. I get output only on the LEFT channe

  • Bootcamp/WinXP and 2nd monitor

    My uncle has a 20" c2d imac with the x1600 video. Sadly, he primarily uses WinXP on it and wants to add a second monitor to it. I have connected a 17" lcd to the other video port and it comes up fine in OS X but, not in bootcamp. I set the resolution

  • Reinstalling Virtual PC 7

    I uninstalled Virtual PC 7.0.2 a while ago, and upon trying to reinstall it now (from the 7.0 CD, 7.0.2 is a downloadable update), the install only wants to copy 686kb of the program. When I run the 7.0 unsintaller, it crashes, which I found is a kno

  • Video and sound out of Sync on 8310

    Hi, anyone help... just got a 8310 and purchased a 4Gb memory card for it. I loaded a film onto it (Mp4) and all was fine. I have then put some music and stuff on the card with another movie too. Now both movies play ok apart from the voice is about