velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <>
Subject Re: Velocity Redirect/QueryString Question
Date Thu, 31 Jan 2008 18:17:55 GMT
Sorry to be the one to break it to you, but the browsers don't share
anchors (anything after the #) with the server.  A little Googling
says this is specified in RFC 2396, section 4.1.  So, there's no way
to do what you want without using javascript on the client side, at
which point Velocity is, of course, done processing the template

If you have control of the incoming URLs, you should use some other
character besides the hash (#) or perhaps just encode the hash.  Of
course, then you'll have to parse the query string manually to get it
into useful form.  If you can't change the URLs, then you will have to
do this client side with javascript.

On Jan 29, 2008 1:27 PM, Disco <> wrote:
> Good Afternoon-
> I am looking to create a dynamic redirect page in velocity.  Essentially
> what I will be doing is passing the page a url variable that contains the
> redirect URL.  The difficulty is in that the url will also have its own
> variables - a second problem is the variables are defined by a # rather than
> ? (the URL redirect is to a flex app)
> A sample URL request would be:
> redirect.vm?url=/about/about.vm#id=1&method=1
> I can not seem to reference any of the information after the #.
> request.QueryString, for example, will only return "url=/about/about.vm"
> Every method I am aware of to capture URL/URI data always truncates upon
> encountering a #.
> Is there any way to get the entire URL passed to the redirect.vm?  Another
> option I was considering is passing the string using ?? instead of the #,
> and then replacing ?? to #.  However, I can not seem to get this to work
> correctly either.
> I'd appreciate any suggestions-
> Thanks,
> David
> --
> View this message in context:
> Sent from the Velocity - User mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message