You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/06/14 07:25:14 UTC
DO NOT REPLY [Bug 35352] New: -
Servlet runs 3x (with the same session) after one GET/POST
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35352>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35352
Summary: Servlet runs 3x (with the same session) after one
GET/POST
Product: Tomcat 5
Version: 5.5.9
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: karnok.d@freemail.hu
I've noticed that on a simple Servlet Page that contains forms and I click on a
standard Submit button, sometimes my Servlet runs 2x-3x times. I'm running the
Tomcat on my own PC under WinXP+SP2 but this happens under Linux (RedHat 3ES)
too. I'm a single user. I know because at the begining of my servlet is a
System.out.println("Starting: MyServlet"); and at the end is a
System.out.prinlnt("Ending: MyServlet");
Form looks like:
<form action='MyServlet' method='POST'>
<input type='hidden' name='PROCESS' value='INSERT'>
<input type='hidden' name='ID' value=''>
<input type='text' name='NAME' value=''>
<input type='submit' value='Send'>
</form>
When everything is ok I get the following in the Tomcat Console:
Starting: MyServlet
Ending: MyServlet
But in some cases the following message appears:
Starting: MyServlet
Starting: MyServlet
Ending: MyServlet
Ending: MyServlet
And at the worst case:
Starting: MyServlet
Starting: MyServlet
Ending: MyServlet
Starting: MyServlet
Ending: MyServlet
Ending: MyServlet
I used the following Browsers: IE6+SP2, Mozilla1.7.8 (XP&Linux), Firefox1.0.4
(XP&Linux), Opera8.0, Netscape7.2
It seems that all 3 instances recieve the same Session content, but they put
and clear values from session (because they think that that session is just
theirs). The MyServlet does database INSERT-s too so running multiple times
causes a Primary Key Violation.
I checked my Browsers with a proxy snooper and they send only one request.
Something causes the Tomcat to run my servlets multiple times with the exact
same session.
I use Eclipse 3.0 + MyEclipse 3.8.4 to generate Servlets and JSPs and for
debugging.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org