You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by a0...@gmx.net on 2002/06/03 09:32:22 UTC

RE: problems with encodeURL transformer

Hello!

Are there any (working) examples available how to use encodeURL transformer?
Unfortunately I my system behaves similar like described in a previous
posting.

Any comments are welcome!

Best regards,

Harald

> 
>
--------------------------------------------------------------------------------
> 
> From: rainer_burgstaller 
> Subject: problems with encodeURL transformer 
> Date: Thu, 28 Mar 2002 01:19:16 -0800 
> 
>
--------------------------------------------------------------------------------
> 
> Hi
> 
> I am trying to get the encodeURL transformer working with Tomcat 4.0.1 and
> JDK 1.3.1 (Cocoon 2.0.2)
> 
> in my sitemap I have following entries
> 
> <map:transformers>
> ...
>      <map:transformer logger="sitemap.transformer.encodeURL" name
> ="encodeURL" src="org.apache.cocoon.transformation.EncodeURLTransformer"/>
> </map:transformers>
> 
> 
> <map:match pattern="*.xsp">
>      <map:generate type="serverpages" src="docs/{1}.xsp"/>
>      <map:transform type="encodeURL"/>
>      <map:select type="browser">
>           <map:when test="opera">
>                <map:transform src="stylesheets/page2wml.xsl"/>
>                <map:serialize type="wml"/>
>           </map:when>
>           <map:when test="wap">
>                <map:transform src="stylesheets/page2wml.xsl"/>
>                <map:serialize type="wml"/>
>           </map:when>
>           <map:otherwise>
>                <map:transform src="stylesheets/page2html.xsl"/>
>                <map:serialize/>
>           </map:otherwise>
>      </map:select>
> </map:match>
> 
> 
> 
> as far as I understand this transformer it parses the whole xml for
> attributes like href,... and replaces them with a url encoded version.
> 
> my xml generates something like this
> 
> <link href="somlink.xsp">link</link>
> 
> which is then transformed by the page2html.xsl into an actual link.
> However, the transformer never gets to work.
> 1. it does not recognize the session when I disable cookies.
>      in setup:
>                 final Request request =
> ObjectModelHelper.getRequest(objectModel);
>                 this.session = request.getSession( false );
>      session is always null
> 
> 2. if I enable cookies. then there is a session but with cookies url
> encoding is not necessary :(
> 
> 
> can anybody help?
> 
> best regards
> 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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

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


RE: problems with encodeURL transformer

Posted by Stephan Michels <st...@vern.chem.tu-berlin.de>.

On Mon, 3 Jun 2002 a000@gmx.net wrote:

> Hello!
>
> Are there any (working) examples available how to use encodeURL transformer?
> Unfortunately I my system behaves similar like described in a previous
> posting.
>


I think the sunpot demos works with the transformer:

> fgrep -nA 3 "encodeURL" build/cocoon/webapp/sitemap.xmap
128:   <map:transformer logger="sitemap.transformer.encodeURL"
name="encodeURL"
src="org.apache.cocoon.transformation.EncodeURLTransformer"/>
129-
130-   <map:transformer logger="sitemap.transformer.write-source"
name="write-source"
src="org.apache.cocoon.transformation.SourceWritingTransformer"/>
131-
--
702:		<map:transform type="encodeURL"/>
703-		<map:serialize/>
704-	</map:match>
705-
--
723:		<map:transform type="encodeURL"/>
724-		<map:serialize/>
725-	</map:match>
726-	<map:match pattern="sunspotdemofree-auth">
--
739:		<map:transform type="encodeURL"/>
740-		<map:serialize/>
741-	</map:match>
742-	<map:match pattern="sunspotdemofree-*">
--
749:		<map:transform type="encodeURL"/>
750-		<map:serialize/>
751-	</map:match>
752-
--
808:				<map:transform type="encodeURL"/>
809-				<map:serialize/>
810-			</map:match>
811-			<map:match pattern="sunspotdemo-adminconf">
--
819:				<map:transform type="encodeURL"/>
820-				<map:serialize/>
821-			</map:match>
822-			<map:match pattern="sunspotdemo-sunriseconf">
--
830:				<map:transform type="encodeURL"/>
831-				<map:serialize/>
832-			</map:match>
833-			<map:match pattern="sunspotdemo-sunriseedit">
--
836:				<map:transform type="encodeURL"/>
837-				<map:serialize/>
838-			</map:match>
839-			<map:match pattern="sunspotdemo-portlets">
--
852:				<map:transform type="encodeURL"/>
853-				<map:serialize/>
854-			</map:match>
855-			<map:match pattern="sunspotdemo-logout">
--
859:				<map:transform type="encodeURL"/>
860-				<map:serialize/>
861-			</map:match>
862-			<map:match pattern="sunspotdemo-*">
--
867:				<map:transform type="encodeURL"/>
868-				<map:serialize/>
869-			</map:match>
870-		</map:act>


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

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