cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Schrijver" <mark.schrij...@mobillion.nl>
Subject Problems with encodeURL transformer
Date Mon, 06 Mar 2006 10:13:42 GMT
Hello all, 

I have the following entry in my sitemap, in the transformer section:

<map:transformer name="encodeURL"
src="org.apache.cocoon.transformation.EncodeURLTransformer">
<!-- default configuration, explicitly defined -->
<include-name>.*/@href|.*/@action|frame/@src</include-name>
<exclude-name>img/@src|(a/@href|iframe/@src)=.*adserver</exclude-name>
</map:transformer>

my pipeline looks like this:
<map:pipelines>

		<map:pipeline internal-only="false" type="caching">

			<map:match pattern="">
				<map:act type="session">
					<map:parameter name="action" value="create"/>
				</map:act>
				<!--map:act type="determineMobileSite">
					<map:redirect-to uri="{redirect}" />
				</map:act-->
				<map:redirect-to uri="/mobile/portal" />
			</map:match>

			<map:match pattern="portal">
				<map:act type="session">
					<map:parameter name="action" value="create"/>
				</map:act>
				<map:act type="determineMobileSite">
					<map:redirect-to uri="{redirect}" />
				</map:act>
				<map:generate type="serverpages"
					src="blogContext:/srcPaginasMobile/pgPortal.xsp" />
				<map:transform type="cinclude">
					<map:parameter name="support-caching" value="true" />
					<map:parameter name="purge" value="false" />
					<map:parameter name="parallel" value="true" />
				</map:transform>
				<map:transform type="i18n">
					<map:parameter name="locale"
						value="{session-attr:taal}" />
				</map:transform>
				<map:transform type="xslt"
					src="blogContext:/xsltPaginasMobile/pgPortal.xsl">
					<map:parameter name="siteCss"
						value="{session-attr:siteDir}" />
					<map:parameter name="sphereCss"
						value="{session-attr:sphereDir}" />
				</map:transform>
				<map:transform type="encodeURL"/>
				<map:serialize type="xhtml" />
			</map:match>

			<map:match pattern="whatis">
				<map:act type="session">
					<map:parameter name="action" value="create"/>
				</map:act>
				<map:act type="determineMobileSite">
					<map:redirect-to uri="{redirect}" />
				</map:act>
				<map:generate type="serverpages"
					src="blogContext:/srcPaginasMobile/pgWhatIsABlog.xsp" />
				<map:transform type="cinclude">
					<map:parameter name="support-caching" value="true" />
					<map:parameter name="purge" value="false" />
					<map:parameter name="parallel" value="true" />
				</map:transform>
				<map:transform type="i18n">
					<map:parameter name="locale"
						value="{session-attr:taal}" />
				</map:transform>
				<map:transform type="xslt"
					src="blogContext:/xsltPaginasMobile/pgWhatIsABlog.xsl">
					<map:parameter name="siteCss"
						value="{session-attr:siteDir}" />
					<map:parameter name="sphereCss"
						value="{session-attr:sphereDir}" />
				</map:transform>
				<map:transform type="encodeURL"/>
				<map:serialize type="xhtml" />
			</map:match>

		</map:pipeline>


My problem is the fopllowing,
I enter the site at the root, and get redirected to the portal, this works fine.
Here the determineMobileSite is triggered, this is a java class that extends AbstractDatabaseAction
In this class I create a session object in which I store various bits of information.

Now I have a browser that does not support session cookies, so I have to use the encodeURL
transformer.
In my portal page, I have a menu with href links. From what I read in the documentation and
what I set up in my sitemap, this href SHOULD be encoded by the encodeURL transformer to contain
the jsessionid. However, this does not matter. This results in a new session being created
each time I click a link. Which is not what I want.

If anyone can tell me where I need to make changes to make this work, please et me know.

Mark Schrijver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message