Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to restrict no of requests?

 
narender kaasam
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • 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 ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
how wecan restrict no of user using filters ? could you explain me clearly?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic