[ 
http://www.stripesframework.org/jira/browse/STS-805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12202#comment-12202
 ] 

Nikolaos commented on STS-805:
------------------------------

Not sure if anyone can come up with hard / fast rules of when / if the context 
path should be appended (unless of course it already exists) based solely on a 
slash at the beginning of a URI... .

But I thought this was something that like many things in Stripes is 
configurable in that you could elect what works best based on your needs by 
using the "prependContext" parameter:

e.g.   <s:url var="url" 
beanclass="org.test.ui.web.view.content.RecentContentHelper" 
prependContext="false">

Can you try using "prependContext"?

--Nikolaos 

> stripes:url does not append the web application context path when the value 
> is a variable
> -----------------------------------------------------------------------------------------
>
>                 Key: STS-805
>                 URL: http://www.stripesframework.org/jira/browse/STS-805
>             Project: Stripes
>          Issue Type: Bug
>          Components: Tag Library
>    Affects Versions: Release 1.5.6
>            Reporter: Matthew Kilpatrick
>            Priority: Minor
>
> When using stripes:url the url entered in the value parameter should 
> automatically append the web application context path when the url begins 
> with a slash and doesn't already contain the context path. It seems to be 
> working correctly in the standard case of putting the literal string within 
> the value parameter, but fails to append the context path when the url comes 
> from a variable. Here are the steps to recreate:
> Create an onclick JS function like the following:
> function urlTest () {
>    var url = '/foo/bar/path';
>    window.location = '<stripes:url value="' + url + '" />';
> }
> The above url variable should not contain the context path. The above 
> function works as expected in 1.5.2 but not in 1.5.6. You can also see that 
> the stripes url tag does work as expected if you change  window.location = 
> '<stripes:url value="' + url + '" />'; to  window.location = '<stripes:url 
> value="/foo/bar/path" />'; in 1.5.6

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to