[ 
http://www.stripesframework.org/jira/browse/STS-805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Gunter resolved STS-805.
----------------------------

    Resolution: Not a Bug
      Assignee: Ben Gunter

Regarding prependContext, there are actually three states, not two.

If prependContext is not specified, then the default behavior is to prepend if 
the URL starts with / and does not start with the context.

If it is set "true" then the context will always be prepended if it is valid to 
do so. It is not valid to prepend the context to a URL that does not start with 
/ because you'd effectively be generating a URL for an entirely different 
context. That is "/myContext" + "some/relative/path" yields 
"/myContextsome/relative/path" which points to the context "/myContextsome". 
Really, the only time prependContext="true" is useful is if you need to 
generate a URL relative to the context that starts with the context name, e.g., 
/foo/foo/bar.

Finally, if it is set "false" then the context is never prepended.

> 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
>            Assignee: Ben Gunter
>            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

        

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to