On 11/10/10 05:09 AM, Ben Gunter wrote:
> The plus sign thing was fixed since 1.5.3, and I had forgotten about it.
> I just released 1.5.4 so that should not be a problem anymore. See this
> link for more information:
>
> http://stripesframework.org/jira/browse/STS-743
Thanks for the pointer Ben.
> The embedded slash is a bit trickier. I can see where you'd want the
> thing not to encode the slash, but if, for example, you had a UrlBinding
> that looked like
>
> @UrlBinding("/foo/{param1}/bar/{param2}")
>
> and you passed param1 with a slash in it, then the encoded slash might
> be necessary to allow Stripes to properly parse the parameters out of
> the URL. (That might not be a perfect example, but I trust you'll get
> what I'm saying.) I'm inclined to say that encoding the slash is the
> proper behavior. If you must have the URLs with slashes not encoded (a
> valid requirement) then I suggest just appending the string to the URL
> using EL instead of using a s:param tag.
Yep, I understand the issue. My only concern is that when a '/' is
encoded, it becomes '%2F'. At least with Tomcat, this is regarded as an
invalid request, and a HTTP 400 is returned. The request does not make
it to Stripes, so the above example would not work even if encoding was
done. I am unsure whether this is a problem with Stripes, or a problem
with Tomcat. Unfortunately I have been unable to test this behavior on
other web servers up to now.
I will look into getting the param appended with EL instead.
Thanks for the response,
Martin
>
> -Ben
>
> On Fri, Nov 5, 2010 at 9:27 AM, Martin Walsh <[email protected]
> <mailto:[email protected]>> wrote:
>
> I am running into a few issues with clean URLs. I am using Stripes 1.5.2
> and Tomcat 6.0.26.
>
> I am attempting to use clean URLs with parameters that represent a file
> path.
>
> e.g.
>
> binding = "/action/test/{path}"
> parameter = "String path = tmp/test.txt"
>
> I am using the stripes:link tag to generate the link on a JSP page using
> the path variable. I am currently running into two issues.
>
> Firstly, the link generated is escaped, escaping the '/'. This results
> in a link of http://localhost:8080/test/action/test/tmp%2Ftest.txt. When
> clicked on, Tomcat returns a error 400 (Bad Request). The request does
> not even make it through to Stripes.
>
>
> Secondly, if the parameter includes a special char, i.e. a space.
>
> e.g.
>
> parameter = "String path = test file.txt"
>
> the link is encoded, which gives
> http://localhost:8080/test/action/test/test+file.txt. However the
> parameter is not decoded, so in my action bean, the path variable is
> "test+file.txt" instead of "test file.txt".
>
>
> Thanks in advance for any help.
>
> M
>
>
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
>
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
>
>
>
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users