struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Weis <djw...@sjdjweis.com>
Subject RE: Some ActionClasses Are Invoked Twice, Why?
Date Thu, 19 Sep 2002 12:33:39 GMT

Print out the user agent in both cases. I think that IE does that to
determine the mime type for an unknown extension (rather than use the
server mime type like they should). I think the user agent string tha the
browser sends is different in the type-determining case. You can just
match on that and return the content type only.

dave


> > -----Original Message-----
> > From: T. Wheeler [mailto:tomwheel@swbell.net]
> > Sent: Thursday, September 19, 2002 09:04
> > To: Struts Users Mailing List
> > Subject: Some ActionClasses Are Invoked Twice, Why?
> > I have found a bug in a Struts application I am developing at 
> > work, and
> > I am having trouble figuring out what might be causing it.  I 
> > will give
> > the brief overview below, and be happy to dive into as much detail as
> > might be needed.
> > 
> > The problem:
> > I have started adding logging to several of my action classes and have
> > started noticing that some of them are being called twice in quick
> > succession.  I know for a fact that it's not a user double-clicking to
> > submit a form; I can reproduce it (only some of the ActionClasses have
> > this problem, but they have it consistently.  To help illustrate the
> > problem, I have an excerpt of the log below, showing that the
> > ActionClass was called twice:
> > 
> > // the first time the action class was called
> > 16:41:11,897 - Checking required permissions
> > 16:41:11,898 - Starting performTask() method
> > 16:41:11,898 - performTask(): Got session attributes;
> > 16:41:11,900 - performTask(): Removing old contexts
> > 16:41:11,900 - performTask(): Calling getAvailableContexts()
> > 16:41:12,728 - performTask(): Got 2 contexts
> > 16:41:12,740 - performTask(): Adding LVBean[Example 1, 0001]
> > 16:41:12,741 - performTask(): Adding LVBean[Example 2, 0026]
> > 16:41:12,741 - performTask(): Setting roles vector
> > 16:41:12,742 - Ending performTask() method
> > 
> > // the second time the action class was called, < 1 second later
> > 16:41:13,039 - Checking required permissions
> > 16:41:13,040 - Starting performTask() method
> > 16:41:13,040 - performTask(): Got session attributes;
> > 16:41:13,043 - performTask(): Removing old contexts
> > 16:41:13,044 - performTask(): Calling getAvailableContexts()
> > 16:41:13,853 - performTask(): Got 2 contexts
> > 16:41:13,854 - performTask(): Adding LVBean[Example 1, 0001]
> > 16:41:13,854 - performTask(): Adding LVBean[Example 2, 0026]
> > 16:41:13,855 - performTask(): Setting roles vector
> > 16:41:13,855 - Ending performTask() method
> > 
> > Again, I will be happy to post code samples upon request, but I don't
> > want to clutter the issue quite yet.
> > 
> > Struts Version-
> > I am using a Struts nightly build from December 2001, but I can
> > reproduce the problem under the most recent 1.1 beta of 
> > Struts (which I
> > downloaded earlier today).
> > 
> > The Server-
> > RedHat Linux 7.2, fully patched, running with Caucho 
> > Resin-2.1.2 and Sun
> > JDK 1.3.1_04 (latest 1.3.1 JVM).  I can reproduce this problem on
> > multiple machines with several different versions of Resin (up to
> > 2.1.4).
> > 
> > Any ideas at what might be causing this, or how to diagnose it?
> > 
> > Thanks in advance for any help or advice you can give.
> > 
> > Tom
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> > <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:struts-user-help@jakarta.apache.org>
> > 
> > 
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
> 

-- 
Dave Weis             "I believe there are more instances of the abridgment
djweis@sjdjweis.com   of the freedom of the people by gradual and silent
                      encroachments of those in power than by violent 
                      and sudden usurpations."- James Madison


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


Mime
View raw message