Hibernate inserts twice when network proxy is used
We are using Struts2-spring and Hibernate in our application. We are facing some strange problem. 开发者_开发技巧When we use network proxy in browsers and access the application, it inserts every record twice. However if we use browsers with "NO PROXY" settings, it works fine. Can anybody help me out? Thanks in advance.
Check the request type. If there is a proxy, the browser might send more HEAD requests to see if the document has really changed. If you changed the request handling code on the server, you may handle these requests like GET.
Example: In Java Servlets, you can override doGet()
or service()
. The former gets invoked only for GET
requests, the latter gets invoked for any type of request (GET
, POST
, HEAD
, DELETE
).
check that you are not using the successful method when running proxy i.e.
without proxy
method1
with proxy
method1 (and) method2
精彩评论