You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Barnett, Brian W." <br...@pearson.com> on 2005/06/03 20:11:24 UTC

RE: Double posting problem [SOLVED]

Well, here's what the problem was.

We added a line of code in our header.jsp tile like this:
<img border="0" src="${DistrictLogo}"/>

There were times when the DistrictLogo was empty, which resulted in html
that looked like this:
<img border="0" src=""/>

This img tag with an empty src attribute caused a request to come into the
Struts controller servlet.

Whew! Glad to have found that one...

-----Original Message-----
From: Barnett, Brian W. 
Sent: Friday, June 03, 2005 11:49 AM
To: 'Struts Users Mailing List'
Subject: RE: Double posting problem


Thanks woodchuck, but the behavior is happening with any request, not just a
form submit using a button.

In the troubleshooting I've done since the post, I stepped out of the entire
call stack of methods and found out that the second hit on the breakpoint
comes when I step out of CoyoteAdapter.server(Request, Response). We're
using Tomcat 5.0.28. Maybe I'll post on the Tomcat list. I have no idea what
could be going on there ??

-----Original Message-----
From: Woodchuck [mailto:woodchuck_5@yahoo.com] 
Sent: Friday, June 03, 2005 11:53 AM
To: Struts Users Mailing List
Subject: Re: Double posting problem


check to see if you are using image buttons <input type="image"> to submit
your forms.

these types of buttons submit your form by default.  if you define
javascript functions for these buttons to do your submitting that would be
the reason for the double submits your getting.  you can get around this
simply by returning false for the event like this:

<input type="image" onclick="doMySubmitFunction(); return false;">

this way, only your javascript function will be the one submitting.

just something to watch out for.

woodchuck


--- Wendy Smoak <ja...@wendysmoak.com> wrote:

> From: "Barnett, Brian W." <br...@pearson.com>
> 
> > We've spent the last couple of weeks enhancing our web app and now
> every
> > get/post to Tomcat from our web app is coming in twice.
> >
> > Any ideas on what I can check?
> 
> Do you have any Filters?  Check that chain.doFilter(...) is only
> called *once*.
> 
> --
> Wendy Smoak
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 



		
__________________________________ 
Discover Yahoo! 
Use Yahoo! to plan a weekend, have fun online and more. Check it out! 
http://discover.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

****************************************************************************

This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org