Hi Martin,

You should be right in the terminology. I derived the name of the tag from
the javax.servlet.http.HttpServletResponse method:
        public java.lang.String encodeURL(java.lang.String url)
        // Encodes the specified URL by including the session ID in it, or,
if encoding is not needed, returns the URL unchanged.

But I don't mind to change it to <rewriteURL>...

Pierre Métras

----- Original Message -----
From: "Martin Cooper" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 17, 2000 12:23 AM
Subject: Re: encodeURL tag


> Pierre,
>
> Isn't this URL rewriting? Shouldn't the tag be called rewriteURL instead
of
> encodeURL?
>
> Unless I'm mistaken, URL encoding is when you encode special characters in
a
> URL, like turning spaces into %20, etc., and URL rewriting is when you
> modify the URL to embed the session ID.
>
> --
> Martin Cooper
> Tumbleweed Communications
>
> ----- Original Message -----
> From: "Pierre Métras" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, November 16, 2000 11:18 AM
> Subject: encodeURL tag
>
>
> > Hi all,
> >
> > Here is a very simple tag. It's role is to add session encoding to its
> > parameter if the client browser doesn't support cookies.
> >
> > In the majority of cases, you don't need it because <link> and <forward>
> do
> > it already. I had the need for it when my application opens a new window
> > from JavaScript to present messages to the user:
> >
> > <script language="JavaScript" type="text/javascript">
> >     window.open('<s:encodeURL href="error.do?action=1243" />');
> > </script>
> >
> > Add the following declaration to your struts.tld file:
> >
> >     <tag>
> >         <name>encodeURL</name>
> >         <tagclass>org.apache.struts.taglib.EncodeURLTag</tagclass>
> >         <bodycontent>EMPTY</bodycontent>
> >         <info>Encodes the URL given as parameter, adding session
> information
> > if necessary</info>
> >         <attribute>
> >             <name>href</name>
> >             <required>true</required>
> >             <rtexprvalue>true</rtexprvalue>
> >         </attribute>
> >     </tag>
> >
> > Hope this helps.
> >
> > Pierre Métras
> >
> >
> >
>
>
>

Reply via email to