on 6/18/01 12:16 AM, "Gary Lawrence Murphy" <[EMAIL PROTECTED]> wrote:
> but unfortunately, Turbine's doGet
> method has not recorded enough information about the request to
> make a choice based on the requested page.
You have a HttpServletRequest and HttpServletResponse object sitting in the
RunData object. You can do everything that a normal servlet can do.
> By moving the two lines
>
> data.setScreen ( data.getParameters().getString("screen") );
> data.setAction ( data.getParameters().getString("action") );
>
> from below the session redirect to just above the test for
> "REDIRECTED_PATHINFO_NAME equals true", the screen/action names are
> made available in the RunData when Turbine tests
> sessionValidator.requiresNewSession(data) --- within SessionValidator,
> I can test for the no-session cases by explicit name (or a naming
> pattern convention) and avoid the redirect on a per-page basis.
In your SessionValidator, you can override what is in data.getParameters()
so that these values return something else. No need to move them.
> I would expect most modern webapps will want to implement RSS-export
> features and will require sessions be optional and invoked only on a
> per-page or per site-area basis; there are many other scenarios where
> there is no need to track session data. Some means to flip between
> these modes depending on the context needs to be part of Turbine.
Right. A SessionValidator will provide you with that functionality.
> Are there any alternative ways to have the screen module determine
> the result of the SessionValidator.requiresNewSession?
You can ask it directly. From Turbine.java...
// Get the instance of the Session Validator.
SessionValidator sessionValidator =
(SessionValidator)ActionLoader
.getInstance().getInstance(configuration.getString(
"action.sessionvalidator"));
Thanks!
-jon
--
"Open source is not available to commercial companies."
-Steve Ballmer, CEO Microsoft
<http://www.suntimes.com/output/tech/cst-fin-micro01.html>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]