G-InfoArena will bring to you all IT related information...
from a common computer Information to a complex information all you will find it here.
G-InfoArena is setup mainly with the aim to help the people who are Novice to IT industry.
Wednesday, 3 September 2014
Duplicate Form Request Interceptor In JAVA
Every project that we do, there are always some common requirement, that project must need to implement. So one of the common requirement i want to discuss here is...
"duplicate form request submission"
In any project duplicate form request must be intercept and must be aborted, to avoid duplicate data or inconsistency.
In J2EE environment, we can achieve this functionality by using following resources-
Using Filter Class
Using Controller Class(Servlet)
Lets start creating.....
Presentation Tier Component (JSPs)
insertstudent.jsp
success.jsp
error.jsp
Controller Component (Filter)
DuplicateRequestInterceptor.class
StudentInsertServlet.class
Entries in Deployment Descriptor(web.xml)
web.xml
You have to include below code in all jsp page that are the part of your navigation, to stop duplicate form submission.
No comments:
Post a Comment