You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Gary Lawrence Murphy <ga...@canada.com> on 2001/06/25 20:03:26 UTC

Avoiding Sessions (again)

This really seemed like it _should_ work, but apparently there's more
session-building code hidden deeper in Turbine:

      How can I avoid setting the cookie and inflicting a redirect?

Here's what I've done:

I have a custom SessionValidator which, when the parameters indicate a
rawscreen request, requiresNewSession returns false and doPerform does
nothing at all.  When raw screens are requested, requiresNewSession
also sets

   data.getParameters().setString("screen", "XmlPage");

where XmlPage is a RawScreen class (I actually have two XML pages, one
which embeds the other)

In Turbine.doGet(), the block beginning

    if ( sessionValidator.requiresNewSession(data) &&
                     data.getSession().isNew() )
                {
                    DynamicURI duri = new DynamicURI (data, true);
                    ...

should be skipped, ie, it avoids calling DynamicURI because
sessionValidator.requiresNewSession returns false ... yet my pages
still return the headers:

  HTTP/1.0 302 Moved Temporarily
  Content-Type: text/html
  Location: http://maya/gate/servlet/gate/xml/http%3A%2F%2Fsomebigfile.com%2Fstuff/redirected/true;jsessionid=8q3qw3zbf1
  Content-Length: 0
  Set-Cookie: JSESSIONID=8q3qw3zbf1;Path=/gate

My debug log output shows that my custom sessionvalidator is being called
and is returning the correct values.

   What is also a mystery is the line further down that reads

     Log.debug("Default Page Module: " + defaultPage);

   never produces any output in any logs even though all the log
   entries in tr.props are set to DEBUG.  This could be because I am
   using the TDK release, but looking at the CVS sources (because I
   must deploy using the release code).

Rawscreen output is remaining elusive.  There's something that I'm just
not grasping about the Turbine request sequence.

1) If not in Turbine.doGet(), where is this redirection being invoked?

2) If not in sessionValidator, where should I customize to launch a
   rawpage with no session state?

-- 
Gary Lawrence Murphy <ga...@teledyn.com> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)


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