You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Matthew Chapman <mc...@franchise.com> on 2002/07/09 20:01:38 UTC
Issue with anchor links
When I attempt to set an anchor link, it is converted from a # to a %23
for example:
<a href="$link.setpage(path,to,file.vm#a">link to file.vm</a>
produces the result:
http:/domain.name/path%20to%20file.vm%23a
This just kills the link and page. How can I get around this (without
hard-coding the URL) ?
regards
Matthew
eMail: mchapman@franchise.com
Phone: 760-943-0080 x 1159
ICQ #: 5428662
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Issue with anchor links
Posted by Terry Steichen <te...@net-frame.com>.
Matthew,
You certainly don't have to hard-code anything - I use href's extensively.
What does the 'link' class do? Can you provide the code?
Regards,
Terry
----- Original Message -----
From: "Matthew Chapman" <mc...@franchise.com>
To: <ve...@jakarta.apache.org>
Sent: Tuesday, July 09, 2002 2:01 PM
Subject: Issue with anchor links
> When I attempt to set an anchor link, it is converted from a # to a %23
>
> for example:
> <a href="$link.setpage(path,to,file.vm#a">link to file.vm</a>
>
> produces the result:
> http:/domain.name/path%20to%20file.vm%23a
>
> This just kills the link and page. How can I get around this (without
> hard-coding the URL) ?
>
> regards
> Matthew
>
> eMail: mchapman@franchise.com
> Phone: 760-943-0080 x 1159
> ICQ #: 5428662
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Issue with anchor links
Posted by Matthew Chapman <mc...@franchise.com>.
Bill, Terry, Kevin, et al.
Thanks, the recommendation(s) worked just fine -
regards
Matthew
On Tue, 9 Jul 2002, Bill Burton wrote:
> Matthew Chapman wrote:
> >
> > When I attempt to set an anchor link, it is converted from a # to a %23
> >
> > for example:
> > <a href="$link.setpage(path,to,file.vm#a">link to file.vm</a>
>
> The closing paren is missing. If the setPage method never generates a
> query string maybe this would work?
> <a href="$link.setpage(path,to,file.vm)#a">link to file.vm</a>
>
> -Bill
>
> >
> > produces the result:
> > http:/domain.name/path%20to%20file.vm%23a
> >
> > This just kills the link and page. How can I get around this (without
> > hard-coding the URL) ?
> >
> > regards
> > Matthew
> >
> > eMail: mchapman@franchise.com
> > Phone: 760-943-0080 x 1159
> > ICQ #: 5428662
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
eMail: mchapman@franchise.com
Phone: 760-943-0080 x 1159
ICQ #: 5428662
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Issue with anchor links
Posted by Bill Burton <bi...@progress.com>.
Matthew Chapman wrote:
>
> When I attempt to set an anchor link, it is converted from a # to a %23
>
> for example:
> <a href="$link.setpage(path,to,file.vm#a">link to file.vm</a>
The closing paren is missing. If the setPage method never generates a
query string maybe this would work?
<a href="$link.setpage(path,to,file.vm)#a">link to file.vm</a>
-Bill
>
> produces the result:
> http:/domain.name/path%20to%20file.vm%23a
>
> This just kills the link and page. How can I get around this (without
> hard-coding the URL) ?
>
> regards
> Matthew
>
> eMail: mchapman@franchise.com
> Phone: 760-943-0080 x 1159
> ICQ #: 5428662
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Issue with anchor links
Posted by Kevin Baynes <kb...@seagullsw.com>.
Mathew-
It appears that you are passing in "pathToFile" as a parameter to an object
in the context called "link".
The return value of the "link.setpage(pathToFile)" method, would depend on
the inner workings of the "link" class, wouldn't it? That would be a Java
programming issue, not a Velocity issue, correct?
The "link" class is performing the URL encoding, isn't it?
~Kevin
> -----Original Message-----
> From: Matthew Chapman [mailto:mchapman@franchise.com]
> Sent: Tuesday, July 09, 2002 2:02 PM
> To: velocity-user@jakarta.apache.org
> Subject: Issue with anchor links
>
>
> When I attempt to set an anchor link, it is converted from a # to a %23
>
> for example:
> <a href="$link.setpage(path,to,file.vm#a">link to file.vm</a>
>
> produces the result:
> http:/domain.name/path%20to%20file.vm%23a
>
> This just kills the link and page. How can I get around this (without
> hard-coding the URL) ?
>
> regards
> Matthew
>
> eMail: mchapman@franchise.com
> Phone: 760-943-0080 x 1159
> ICQ #: 5428662
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>