Answer the question
In order to leave comments, you need to log in
How to track client requests to a servlet?
Good day to all! There is an application on Angular which interacts with a servlet. There was a need to limit requests to the servlet to a maximum of 3 calls per day for one client. Identification of clients is planned by IP. What Java EE language mechanism will effectively solve this problem? As an option - HttpSession, but I want to know all the ways to solve the problem and choose the most efficient and technically beautiful one. Need an idea, servlet container is Tomcat 7. Thanks for the help.
Answer the question
In order to leave comments, you need to log in
Servlet Filters at the UI level, or interceptors (at the business logic level).
Well, I would not identify by IP. At least by session + authorization, otherwise you will either block subnets with gray IPs, or there will be no protection at all.
Well, the right mechanism for you is servlet filter - www.journaldev.com/1933/java-servlet-filter-exampl...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question