On 7/8/05, Mitchell, Steven C <[EMAIL PROTECTED]> wrote:
> I'm curious to hear what other people are doing regarding the passing of
> data between actions.  Take for example an advanced search page with
> validation, drop down lists, the works.  Upon successful validation the
> user should flow to a search results page.  Assume the results page is
> part of something bigger that may require additional server-side
> processing.
> 
> In the past I have put the search results list on the same action form
> as the search criteria and just forwarded to a different JSP from the
> same action.

It will sound like a scratched vinil, but I believe that forwarding
from search page to result page is not the right thing to do, because
whenever you refresh result page, you run the search query again. So,
it should be a redirect.

I see the following choices:

* pass search results in request
* pass search results in session
* pass results in session, and navigational info like current page,
first line on page, last line on page, etc. in request.

Result page for search form does not have to be stateful. What do you
expect, if you navigate to result page, typing its location in address
bar? If it does not have to keep previous search results, than as long
as you able to fit everything into request, it probably would be the
best.

If you decide to use redirect and request, action forms or request
object will not help you. You would have to append it manually to URL,
since you cannot simply stick it into request object, it is destroyed
and recreated with each request.

P.S. If you have simple string results, maybe you can use some kind of
hack, sticking results into session under error message key, so after
the results accessed, they are removed by RequestProcessor
automatically?

Did not give this a lot of thought. But this idea seems promising: to
define types/instances/keys of ojects, which would be removed
automatically after accessed.

Michael.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to