struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lesaint Sébastien <lesa...@ginlex.com>
Subject RE: Dispatch Action called Twice
Date Tue, 12 Oct 2004 16:36:14 GMT
What do you want details about? bug or how I found it? Maybe both?

-----Message d'origine-----
De=A0: Rajesh [mailto:rajesh@gkbcinc.com]=20
Envoy=E9=A0: mardi 12 octobre 2004 11:29
=C0=A0: 'Struts Users Mailing List'
Objet=A0: RE: Dispatch Action called Twice

Hai Seb'

I cant get you, please explain in details ...

Rajesh=20


Regards,
=20
Rajmahendra R. Hegde
Project Leader
GK Bharani Software Pvt. Ltd.
=20
There are two ways of constructing a software design. One way is to =
make it
so simple that there are obviously no deficiencies. And the other way =
is to
make it so complicated that there are no obvious deficiencies.=20
                                                    -- C.A.R. Hoare

-----Original Message-----
From: Lesaint S=E9bastien [mailto:lesaint@ginlex.com]=20
Sent: Tuesday, October 12, 2004 2:26 PM
To: Struts Users Mailing List
Subject: RE: Dispatch Action called Twice

I'm a genius, that's it :p

Really searched for days and I had the idea to check the access log of =
the
server. Saw that a request to a specific file created two requests =
being
logged. In my case, it was not twice the same file. Checked the =
generated
HTML source and saw that the path of this mystery file was in the base =
tag.

I had noticed just before that, that the problem did not occur with IE. =
So,
actually, the problem is not really struts, but any-browser-but-IE base
tag's support.

I'm glad I helped.

Seb'

-----Message d'origine-----
De=A0: Marco Mistroni [mailto:mmistroni@waersystems.com]
Envoy=E9=A0: mardi 12 octobre 2004 10:21
=C0=A0: 'Struts Users Mailing List'
Objet=A0: RE: Dispatch Action called Twice

Hello,
	I have been experiencing similar problem...
	Looks like that's the fix.... thanx man, You saved my day! I have
been struggling with it Since last Friday....

Question: how did you find it out? I am curious...

Regards
	marco

-----Original Message-----
From: Lesaint S=E9bastien [mailto:lesaint@ginlex.com]
Sent: 12 October 2004 08:44
To: Struts Users Mailing List
Subject: RE: Dispatch Action called Twice

I had a similar issue once.
Came up that the <html:base /> tag was responsible for it, and browser =
other
than IE as well (I'm not an IE fan at all).
In the case <html:base /> renders the URI of a file not a directory, IE =
does
checks if the path, file ignored, is valid, other browser like mozilla =
or
Firefox send a request to the file, causing the action to be called.

Do you use it?
If so, check the source of the generated HTML page in your browser and =
see
if the URL in the base tag targets your dispatchAction by any chance.

I solved the problem by removing the <html:base /> tag. But, this tag =
is
useful, so I plan on using the old jsp trick for this tag:=20
<%
String path =3D request.getContextPath();
String basePath =3D
request.getScheme()+"://"+request.getServerName()+":"+request.getServerP=

ort(
)+path+"/";
%>
[...]
<base href=3D"<%=3DbasePath%>">

Hope this is of any help.
I really look for this problem a long time...

I prompt this problem on the dev-list, but looks like no one considered =
it
worth modifying tag-lib's code. I think the <html:base /> tag should =
render
a directory URL (as a base path, it so obvious), not a file.

Seb'

-----Message d'origine-----
De=A0: Michael McGrady [mailto:mike@michaelmcgrady.com] Envoy=E9=A0: =
mardi 12
octobre 2004 09:00 =C0=A0: Struts Users Mailing List Objet=A0: Re: =
Dispatch Action
called Twice

Hi, Rajesh,

I like, by the way, your saying at the bottom of your email.  Cool! =20
There is a big gap between what is written and passed to the standard =
out in
your class and what shows up on your screen.  Can you please give

us some idea of what you are doing?  Clearly it is not looping in the =
place
where you have written the system out code.  So, something else is

happening.  We cannot find out what that is unless you show us more.

Michael McGrady

Rajesh wrote:

> hai McGrady
>
>I just write some System.out.println in the action function to just
debug
>some values of variables...
>
>Say
>
>I gave
>
>System.out.println("1");
>...
>System.out.println("2");
>...
>
>
>In tomcat console in dos screen it displays
>
>1
>2
>...
>1
>2
>...
>
>I don't know why its coming twice...
>
>Am not looping it any place or am calling the action again in any =
place
>
>Regards,
>=20
>Rajmahendra R. Hegde
>Project Leader
>GK Bharani Software Pvt. Ltd.
>=20
>There are two ways of constructing a software design. One way is to
make it
>so simple that there are obviously no deficiencies. And the other way
is to
>make it so complicated that there are no obvious deficiencies.=20
>                                                    -- C.A.R. Hoare
>
>-----Original Message-----
>From: Michael McGrady [mailto:mike@michaelmcgrady.com]
>Sent: Tuesday, October 12, 2004 11:26 AM
>To: Struts Users Mailing List
>Subject: Re: Dispatch Action called Twice
>
>Don't know about others, Rajesh, but I need more information.  Have =
you=20
>debugged it?
>
>Rajesh wrote:
>
> =20
>
>>Hai all,
>>
>>am working in Struts 1.1
>>
>>some time in my program some DispatchActions are called twice!!!!
>>
>>am not sure whats the problem
>>
>>am working in Widnows tomcat5
>>
>>in log displayed in tomcat console when i made a request of a action
it=20
>>displays the system.out command inside those action twice like
>>
>>after callinig one and next time another
>>
>>can anybody help me why its happining so
>>
>>Regards,
>>
>>Rajmahendra R. Hegde
>>
>>There are two ways of constructing a software design. One way is to=20
>>make it so simple that there are obviously no deficiencies. And the=20
>>other way is to make it so complicated that there are no obvious
>>   =20
>>
>deficiencies.
> =20
>
>>                                                   -- C.A.R. Hoare
>>
>>
>>=20
>>
>>   =20
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> =20
>



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


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message