• 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

How to restrict no of requests?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
How to restrict(stop) no of requests to a perticular application in Tomcat deployment?

For all the applications in tomcat we can using server.xml,But perticular application i don't know could you tell me this?

[ May 16, 2006: Message edited by: narender kaasam ]
[ May 16, 2006: Message edited by: Bear Bibeault ]
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This sounds like a job for a Filter - see the javax.servlet.Filter interface Javadocs to start off.
Do you want to "throttle" the requests so that extra requests wait their turn or discard the request with a "Try later" approach?
Bill
 
narender kaasam
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how wecan restrict no of user using filters ? could you explain me clearly?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let's start with you telling us exactly what you're trying to do?

Are you trying to limit the number of sessions?
Does your app use sessions?
If so, are you sticking with the default timeout of 30 minutes or do you need to change it?

If this isn't to be tied to sessions, are you trying to limit the number of concurrent hits or the number of hits over a given amount of time?
If the latter, what is the amount of time.

As William asked:
What is the behaviour you want your app to exibit when someone tries to hit your app after the max number of hits has taken place?

There are several approaches you could take and nobody wants to explain all of them in detail (at least not here). Let us know exactly what your needs are and someone will be sure to suggest a path for you to follow.
reply
    Bookmark Topic Watch Topic
  • New Topic