Starki,
I assume you have a form or a link on a page that the user submits. Here
is a sample of a simple link with parameters:
<jsp:useBean id="params" class="java.util.HashMap"/>
<c:set target="${params}" property="param1" value="value1"/>
<c:set target="${params}" property="param2" value="value2"/>
<html:link action="/someLongRunningAction" name="params">Do
Something</html:link>
I'm making use of the set tag from the JSTL core tag library to set the
parameters into a HashMap, then linking the the action.
The Action subclass I'm using is just a ForwardAction, which forwards to
"wait.jsp"
From struts-config.xml:
<action path="/someLongRunningAction" forward="/pages/wait.jsp" />
Then, in the wait.jsp page, I pull the request parameters from the
request instance (I'm using the runtime expression value version of the
set tag here) and store them in a page scope variable called
"parameters". Then I just set the url in the content attribute of the
meta http-equiv tag to the value rendered by the html rewrite tag,
passing the parameters map.
<html:html>
<head>
<c_rt:set var="parameters" value="<%= request.getParameterMap() %>"
scope="page"/>
<meta http-equiv="refresh" content="0;url=<html:rewrite
action="/theRealTargetAction" name="parameters"/>">
<title>Untitled Document</title>
</head>
<body/>
</html:html>
Hope that helps!
starki78 wrote:
Hi Adam, an example
would be great!
This is really a great problem to us!
Especially then the post method is called!
Thanks a lot in advance
Starky
---------- Initial Header -----------
>From : "Adam Samere" [EMAIL PROTECTED]
To : "user" user@struts.apache.org
Cc :
Date : Tue, 23 May 2006 22:16:44 -0400
Subject : Re: How to pass request parameters through a waiting page?
Hi Starki!
You should easily be able to grab the request parameters on your waiting page, then use them in the generated target URL. I'm assuming your waiting page
then redirects the user to the target page using meta tags or javascript, right? I'll be happy to provide an example if you'd like.
Adam
Hi!
I set request-paramteres within an jsp
but introduced a waiting page to the next action.
Now the request parameter cannot be found anymore!
How can I achieve that the waiting jsp, recopies the
request-attributes? Is this possible in any way?
I don't want to write it to the session!
Thanks a lot!
Starki
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]