You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mansour <ma...@yahoo.com> on 2007/05/23 23:16:51 UTC

Spring and executeAndWait

Do I need to use or configure spring to get executeAndWait interceptor 
working ?
if yes, is there ant pointers or documentation ?

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


Re: Spring and executeAndWait

Posted by Dale Newfield <Da...@Newfield.org>.
Mansour wrote:
> By the way, why did you include the action in the wait page ?
> 
> <meta http-equiv="refresh" content="60;url=<s:url action="uploadPhotos" 
> namespace=""/>"/>

Are you suggesting that this:
<meta http-equiv="refresh" content="60;url=<s:url />"/>

will also work, and quite possibly make the page useful for more 
actions?  The rest of the page makes this a special purpose page anyway, 
and I wasn't sure what that tag would default to without any args.  I'll 
definitely test it out, though, and from your comment I'm guessing it'll 
work :-).  Thanks for the suggestion!

-Dale

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


Re: Spring and executeAndWait

Posted by Mansour <ma...@yahoo.com>.
By the way, why did you include the action in the wait page ?

<meta http-equiv="refresh" content="60;url=<s:url action="uploadPhotos" 
namespace=""/>"/>


Mansour wrote:
> Dale:
> That worked just like magic.  Thank you.
> I was about to create page for wait.jsp that looks exactly like the 
> mainLayout.jsp  and exclude the wait.jsp from the decorators in 
> siteMesh and include the refresh meta tag in it. But you ways is way 
> better. Thanks.
>
>
>
> Dale Newfield wrote:
>> Mansour wrote:
>>> I thought this will be generated automatically by FreeMaker iif you 
>>> don't provide your waiting page, according to the documentation.
>>
>> It should be.  When I first started using execAndWait it generated 
>> the page for me automagically, but then later I wanted to tailor the 
>> content, so I created a "wait" result in which I needed to 
>> specifically add the appropriate header.
>>
>> If you're using siteMesh you should be able to include a <head> 
>> section in your target .jsp file, and sitemesh should include that 
>> wherever you put <decorator:head/> in your decorator.
>>
>> From my wait .jsp:
>>
>> <head>
>>     <title><fmt:message key="upload.title"/></title>
>>     <content tag="heading"><fmt:message key="upload.heading"/></content>
>>     <meta name="menu" content="PhotosUpload"/>
>>     <meta http-equiv="Cache-Control" content="no-store"/>
>>     <meta http-equiv="Pragma" content="no-cache"/>
>>     <meta http-equiv="Expires" content="0"/>
>>     <meta http-equiv="refresh" content="60;url=<s:url 
>> action="uploadPhotos" namespace=""/>"/>
>> </head>
>>
>> ---------------------------------------------------------------------
>> 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
>
>


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


Re: Spring and executeAndWait

Posted by Mansour <ma...@yahoo.com>.
Dale:
That worked just like magic.  Thank you.
I was about to create page for wait.jsp that looks exactly like the 
mainLayout.jsp  and exclude the wait.jsp from the decorators in siteMesh 
and include the refresh meta tag in it. But you ways is way better. Thanks.



Dale Newfield wrote:
> Mansour wrote:
>> I thought this will be generated automatically by FreeMaker iif you 
>> don't provide your waiting page, according to the documentation.
>
> It should be.  When I first started using execAndWait it generated the 
> page for me automagically, but then later I wanted to tailor the 
> content, so I created a "wait" result in which I needed to 
> specifically add the appropriate header.
>
> If you're using siteMesh you should be able to include a <head> 
> section in your target .jsp file, and sitemesh should include that 
> wherever you put <decorator:head/> in your decorator.
>
> From my wait .jsp:
>
> <head>
>     <title><fmt:message key="upload.title"/></title>
>     <content tag="heading"><fmt:message key="upload.heading"/></content>
>     <meta name="menu" content="PhotosUpload"/>
>     <meta http-equiv="Cache-Control" content="no-store"/>
>     <meta http-equiv="Pragma" content="no-cache"/>
>     <meta http-equiv="Expires" content="0"/>
>     <meta http-equiv="refresh" content="60;url=<s:url 
> action="uploadPhotos" namespace=""/>"/>
> </head>
>
> ---------------------------------------------------------------------
> 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


Re: Spring and executeAndWait

Posted by Dale Newfield <Da...@Newfield.org>.
Mansour wrote:
> I thought this will be generated automatically by FreeMaker iif you 
> don't provide your waiting page, according to the documentation.

It should be.  When I first started using execAndWait it generated the 
page for me automagically, but then later I wanted to tailor the 
content, so I created a "wait" result in which I needed to specifically 
add the appropriate header.

If you're using siteMesh you should be able to include a <head> section 
in your target .jsp file, and sitemesh should include that wherever you 
put <decorator:head/> in your decorator.

 From my wait .jsp:

<head>
     <title><fmt:message key="upload.title"/></title>
     <content tag="heading"><fmt:message key="upload.heading"/></content>
     <meta name="menu" content="PhotosUpload"/>
     <meta http-equiv="Cache-Control" content="no-store"/>
     <meta http-equiv="Pragma" content="no-cache"/>
     <meta http-equiv="Expires" content="0"/>
     <meta http-equiv="refresh" content="60;url=<s:url 
action="uploadPhotos" namespace=""/>"/>
</head>

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


Re: Spring and executeAndWait

Posted by Dave Newton <ne...@yahoo.com>.
--- Mansour <ma...@yahoo.com> wrote:
> When I inserted the <meta 
> http-equiv="refresh" content="5;url=<s:url
> includeParams="all"/>"/> in 
> the mainLayout.jsp, it forwarded fine, but all the
> pages on the site refresh themselves every 5 seconds


Just think of the ad revenue.

> Do You have a way around this ?

I don't know anything about SiteMesh, but I'd assume
you'd need to use a different layout for actions that
need different functionality in the header.

d.



       
____________________________________________________________________________________Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

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


Re: Spring and executeAndWait

Posted by Mansour <ma...@yahoo.com>.
That helped a lot. Thank you Dale and Dave.
Now the problem was that I am using siteMesh and inserting header, 
footer and navigation pages. When I inserted the  <meta 
http-equiv="refresh" content="5;url=<s:url includeParams="all"/>"/> in 
the mainLayout.jsp, it forwarded fine, but all the pages on the site 
refresh themselves every 5 seconds ?

Do You have a way around this ?


Mansour wrote:
> Dale Newfield wrote:
>> Mansour wrote:
>>> This was the first thing I did. The waiting page stays, and the 
>>> results are never shown unless I hit refresh.
>>
>> That's appropriate, except that a meta tag in the head of the page 
>> should cause your browser to automatically refresh.
>>
>> Something like:
>>
>> <meta http-equiv="refresh" content="60;url=<s:url action="whatever"/>"/>
> I thought this will be generated automatically by FreeMaker iif you 
> don't provide your waiting page, according to the documentation.
>
>>
>> ("60" is in seconds, so you can set that to whatever you want.)
>>
>> -Dale
>>
>> ---------------------------------------------------------------------
>> 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
>
>


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


Re: Spring and executeAndWait

Posted by Dave Newton <ne...@yahoo.com>.
--- Mansour <ma...@yahoo.com> wrote:
> I thought this will be generated automatically by
> FreeMaker iif you don't provide your waiting page, 
> according to the documentation.

Did you verify that the HTML it is producing is
correct and that your browser is actually refreshing
the page?

d.



       
____________________________________________________________________________________Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433

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


Re: Spring and executeAndWait

Posted by Mansour <ma...@yahoo.com>.
Dale Newfield wrote:
> Mansour wrote:
>> This was the first thing I did. The waiting page stays, and the 
>> results are never shown unless I hit refresh.
>
> That's appropriate, except that a meta tag in the head of the page 
> should cause your browser to automatically refresh.
>
> Something like:
>
> <meta http-equiv="refresh" content="60;url=<s:url action="whatever"/>"/>
I thought this will be generated automatically by FreeMaker iif you 
don't provide your waiting page, according to the documentation.

>
> ("60" is in seconds, so you can set that to whatever you want.)
>
> -Dale
>
> ---------------------------------------------------------------------
> 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


Re: Spring and executeAndWait

Posted by Dale Newfield <Da...@Newfield.org>.
Mansour wrote:
> This was the first thing I did. The waiting page stays, and the results 
> are never shown unless I hit refresh.

That's appropriate, except that a meta tag in the head of the page 
should cause your browser to automatically refresh.

Something like:

<meta http-equiv="refresh" content="60;url=<s:url action="whatever"/>"/>

("60" is in seconds, so you can set that to whatever you want.)

-Dale

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


Re: Spring and executeAndWait

Posted by Mansour <ma...@yahoo.com>.
Dave Newton wrote:
> --- Mansour <ma...@yahoo.com> wrote:
>   
>> Do I need to use or configure spring to get
>> executeAndWait interceptor working ?
>>     
>
> Don't know why you would.
>   
Because that's the only thing i didn't try.
> Did you look at the examples in showcase?
>   
This was the first thing I did. The waiting page stays, and the results 
are never shown unless I hit refresh.

> d.
>
>
>
>        
> ____________________________________________________________________________________Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
> http://smallbusiness.yahoo.com/webhosting 
>
> ---------------------------------------------------------------------
> 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


Re: Spring and executeAndWait

Posted by Dave Newton <ne...@yahoo.com>.
--- Mansour <ma...@yahoo.com> wrote:
> Do I need to use or configure spring to get
> executeAndWait interceptor working ?

Don't know why you would.

Did you look at the examples in showcase?

d.



       
____________________________________________________________________________________Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting 

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