How to restrict spring controller to process duplicate get requests from browser [closed]
I'm working on one application which is based on spring MVC architecture. We have a controller method of request type GET and returns some jsp after some calculations.
Before page got rendered completely on browser window,user can refresh the page continuously. This is increasing the page load time .To get rid of performance issues,I would like to handle these duplicate requests at back end.
Please suggest the best way to handle these kind of scenarios at back end.
spring spring-mvc spring-security spring-filter
closed as too broad by dur, Hovercraft Full Of Eels, eyllanesc, sideshowbarker, Makyen Nov 17 at 0:29
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I'm working on one application which is based on spring MVC architecture. We have a controller method of request type GET and returns some jsp after some calculations.
Before page got rendered completely on browser window,user can refresh the page continuously. This is increasing the page load time .To get rid of performance issues,I would like to handle these duplicate requests at back end.
Please suggest the best way to handle these kind of scenarios at back end.
spring spring-mvc spring-security spring-filter
closed as too broad by dur, Hovercraft Full Of Eels, eyllanesc, sideshowbarker, Makyen Nov 17 at 0:29
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
You can add a servlet filter for this scenario
– akuma8
Nov 12 at 13:38
add a comment |
I'm working on one application which is based on spring MVC architecture. We have a controller method of request type GET and returns some jsp after some calculations.
Before page got rendered completely on browser window,user can refresh the page continuously. This is increasing the page load time .To get rid of performance issues,I would like to handle these duplicate requests at back end.
Please suggest the best way to handle these kind of scenarios at back end.
spring spring-mvc spring-security spring-filter
I'm working on one application which is based on spring MVC architecture. We have a controller method of request type GET and returns some jsp after some calculations.
Before page got rendered completely on browser window,user can refresh the page continuously. This is increasing the page load time .To get rid of performance issues,I would like to handle these duplicate requests at back end.
Please suggest the best way to handle these kind of scenarios at back end.
spring spring-mvc spring-security spring-filter
spring spring-mvc spring-security spring-filter
edited Nov 13 at 10:20
asked Nov 12 at 13:27
Venkatesh Kadali
62
62
closed as too broad by dur, Hovercraft Full Of Eels, eyllanesc, sideshowbarker, Makyen Nov 17 at 0:29
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as too broad by dur, Hovercraft Full Of Eels, eyllanesc, sideshowbarker, Makyen Nov 17 at 0:29
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
You can add a servlet filter for this scenario
– akuma8
Nov 12 at 13:38
add a comment |
1
You can add a servlet filter for this scenario
– akuma8
Nov 12 at 13:38
1
1
You can add a servlet filter for this scenario
– akuma8
Nov 12 at 13:38
You can add a servlet filter for this scenario
– akuma8
Nov 12 at 13:38
add a comment |
1 Answer
1
active
oldest
votes
It is possible to reduce by some steps:
- You can use cache on the backend using Infispan or EhCache using
spring Cache , so if the result was generated and done it would cache it and gives response without calculating again - Actually you can redirect from calls to another controller , that use
would not trigger the same endpoint many times , but it will request
another which will not affect one you mentioned
Here is tutorial on spring Cache
- https://www.baeldung.com/spring-cache-tutorial
I know one more thing which is called Post redirect Get , in this case user could sumbit form only one time after that will be redirected to another endpoint and subsequent calls on refresh button will call it.
Here is userful link :
- https://en.wikipedia.org/wiki/Post/Redirect/Get
I think this is helpful.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It is possible to reduce by some steps:
- You can use cache on the backend using Infispan or EhCache using
spring Cache , so if the result was generated and done it would cache it and gives response without calculating again - Actually you can redirect from calls to another controller , that use
would not trigger the same endpoint many times , but it will request
another which will not affect one you mentioned
Here is tutorial on spring Cache
- https://www.baeldung.com/spring-cache-tutorial
I know one more thing which is called Post redirect Get , in this case user could sumbit form only one time after that will be redirected to another endpoint and subsequent calls on refresh button will call it.
Here is userful link :
- https://en.wikipedia.org/wiki/Post/Redirect/Get
I think this is helpful.
add a comment |
It is possible to reduce by some steps:
- You can use cache on the backend using Infispan or EhCache using
spring Cache , so if the result was generated and done it would cache it and gives response without calculating again - Actually you can redirect from calls to another controller , that use
would not trigger the same endpoint many times , but it will request
another which will not affect one you mentioned
Here is tutorial on spring Cache
- https://www.baeldung.com/spring-cache-tutorial
I know one more thing which is called Post redirect Get , in this case user could sumbit form only one time after that will be redirected to another endpoint and subsequent calls on refresh button will call it.
Here is userful link :
- https://en.wikipedia.org/wiki/Post/Redirect/Get
I think this is helpful.
add a comment |
It is possible to reduce by some steps:
- You can use cache on the backend using Infispan or EhCache using
spring Cache , so if the result was generated and done it would cache it and gives response without calculating again - Actually you can redirect from calls to another controller , that use
would not trigger the same endpoint many times , but it will request
another which will not affect one you mentioned
Here is tutorial on spring Cache
- https://www.baeldung.com/spring-cache-tutorial
I know one more thing which is called Post redirect Get , in this case user could sumbit form only one time after that will be redirected to another endpoint and subsequent calls on refresh button will call it.
Here is userful link :
- https://en.wikipedia.org/wiki/Post/Redirect/Get
I think this is helpful.
It is possible to reduce by some steps:
- You can use cache on the backend using Infispan or EhCache using
spring Cache , so if the result was generated and done it would cache it and gives response without calculating again - Actually you can redirect from calls to another controller , that use
would not trigger the same endpoint many times , but it will request
another which will not affect one you mentioned
Here is tutorial on spring Cache
- https://www.baeldung.com/spring-cache-tutorial
I know one more thing which is called Post redirect Get , in this case user could sumbit form only one time after that will be redirected to another endpoint and subsequent calls on refresh button will call it.
Here is userful link :
- https://en.wikipedia.org/wiki/Post/Redirect/Get
I think this is helpful.
edited Nov 12 at 13:43
answered Nov 12 at 13:38
Mykhailo Moskura
839112
839112
add a comment |
add a comment |
1
You can add a servlet filter for this scenario
– akuma8
Nov 12 at 13:38