You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by neil <nb...@aisoftware.com.au> on 2002/09/19 08:26:39 UTC

fix EncodeURLTransformer to process page that generates the session

Hi,
I've just started using org.apache.cocoon.transformation.EncodeURLTransformer and found it works fine
except for the first page generated after my login page i.e. the page that creates the session.

I see that it uses
	request.isRequestedSessionIdFromURL()
to determine whether any encoding is required, but this is false for the page that creates the session.

If I change the test from
            if ( request.isRequestedSessionIdFromURL() ) {
to
	      final String fred = "fred.html";
            if ( request.isRequestedSessionIdFromURL() || !fred.equals(response.encodeURL(fred)) ) {
then it works for this page too. Maybe there's a neater way to do the same thing?

Without this fix a workaround would be to create the session when the login form is generated
instead of when its posted.
Cheers,
	Neil.


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>