You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Manish <pr...@gmx.net> on 2009/12/10 16:22:21 UTC

Strange Velocity bug with $request.getRequestURL() in Tomcat 5.5

I am facing strange issue in Tomcat 5.5 with velocity. This code works
perfectly alright in Tomcat 5. I have following code in VTL to create
some link dynamically -

 #set ($myURL = "$request.getRequestURL()?someFlag=true")

Now this code results in following string in Tomcat 5 -

$myURL = "http://myhost.com/path/abc.do?someFlag=true"

Whereas in Tomcat 5.5, I get this -

$myURL = "http://myhost.com/path/xyz.vm?someFlag=true"
 
For some weird reason, I get VTL page name instead of the struts action?
What could be causing this? And why it only takes place in Tomcat 5.5
and not in Tomcat 5?

Any pointers, help would be highly appreciated!

TIA,
- manish


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: Strange Velocity bug with $request.getRequestURL() in Tomcat 5.5

Posted by Manish <pr...@gmx.net>.
You're right Nathan!
Here is the Tomcat bug, which actually is a fix - ;)
https://issues.apache.org/bugzilla/show_bug.cgi?id=28222

- Manish

On Thu, 2009-12-10 at 08:54 -0800, Nathan Bubna wrote:
> This is a question for the Tomcat user list.  the $request reference
> is for their HttpServletRequest implementation.  So this is some
> change what the getRequestURL() method does.  Velocity is just used to
> call the method and has no control over what the method returns.  That
> said, if i knew that answer, i'd tell you, but i can't see any obvious
> reason why Tomcat would be giving different answers if the only thing
> that you changed was upgrading from 5 to 5.5.
> 
> 2009/12/10 Manish <pr...@gmx.net>:
> > I am facing strange issue in Tomcat 5.5 with velocity. This code works
> > perfectly alright in Tomcat 5. I have following code in VTL to create
> > some link dynamically -
> >
> >  #set ($myURL = "$request.getRequestURL()?someFlag=true")
> >
> > Now this code results in following string in Tomcat 5 -
> >
> > $myURL = "http://myhost.com/path/abc.do?someFlag=true"
> >
> > Whereas in Tomcat 5.5, I get this -
> >
> > $myURL = "http://myhost.com/path/xyz.vm?someFlag=true"
> >
> > For some weird reason, I get VTL page name instead of the struts action?
> > What could be causing this? And why it only takes place in Tomcat 5.5
> > and not in Tomcat 5?
> >
> > Any pointers, help would be highly appreciated!
> >
> > TIA,
> > - manish
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> > For additional commands, e-mail: user-help@velocity.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: Strange Velocity bug with $request.getRequestURL() in Tomcat 5.5

Posted by Nathan Bubna <nb...@gmail.com>.
This is a question for the Tomcat user list.  the $request reference
is for their HttpServletRequest implementation.  So this is some
change what the getRequestURL() method does.  Velocity is just used to
call the method and has no control over what the method returns.  That
said, if i knew that answer, i'd tell you, but i can't see any obvious
reason why Tomcat would be giving different answers if the only thing
that you changed was upgrading from 5 to 5.5.

2009/12/10 Manish <pr...@gmx.net>:
> I am facing strange issue in Tomcat 5.5 with velocity. This code works
> perfectly alright in Tomcat 5. I have following code in VTL to create
> some link dynamically -
>
>  #set ($myURL = "$request.getRequestURL()?someFlag=true")
>
> Now this code results in following string in Tomcat 5 -
>
> $myURL = "http://myhost.com/path/abc.do?someFlag=true"
>
> Whereas in Tomcat 5.5, I get this -
>
> $myURL = "http://myhost.com/path/xyz.vm?someFlag=true"
>
> For some weird reason, I get VTL page name instead of the struts action?
> What could be causing this? And why it only takes place in Tomcat 5.5
> and not in Tomcat 5?
>
> Any pointers, help would be highly appreciated!
>
> TIA,
> - manish
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org