You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "smallufo (JIRA)" <ji...@apache.org> on 2009/11/23 09:30:39 UTC

[jira] Created: (WICKET-2586) [1.4.3] RequestUtils.toAbsolutePath("") skips the last value

[1.4.3] RequestUtils.toAbsolutePath("") skips the last value
------------------------------------------------------------

                 Key: WICKET-2586
                 URL: https://issues.apache.org/jira/browse/WICKET-2586
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4.3
            Reporter: smallufo


The code is following :

WebApplication :
mountBookmarkablePage("/TestPage" , TestPage.class);

TestPage.html :
url = <span wicket:id="url"></span>

TestPage.java :
final String url = RequestUtils.toAbsolutePath("");
add(new Label("url" , Model.of(url)));

If I open
http://foobar:8080/quickstart/app/TestPage 
it shows  http://foobar:8080/quickstart/app/TestPage  , correct 

if I open http://foobar:8080/quickstart/app/TestPage/a/b/
it shows : http://foobar:8080/quickstart/app/TestPage/a/b/ , correct

BUT , 
if I open http://foobar:8080/quickstart/app/TestPage/a/b
it shows : http://foobar:8080/quickstart/app/TestPage/a , WRONG 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-2586) [1.4.3] RequestUtils.toAbsolutePath("") skips the last value

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-2586.
----------------------------------------

    Resolution: Invalid
      Assignee: Juergen Donnerstag

correct, it is intended

> [1.4.3] RequestUtils.toAbsolutePath("") skips the last value
> ------------------------------------------------------------
>
>                 Key: WICKET-2586
>                 URL: https://issues.apache.org/jira/browse/WICKET-2586
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.3
>            Reporter: smallufo
>            Assignee: Juergen Donnerstag
>
> The code is following :
> WebApplication :
> mountBookmarkablePage("/TestPage" , TestPage.class);
> TestPage.html :
> url = <span wicket:id="url"></span>
> TestPage.java :
> final String url = RequestUtils.toAbsolutePath("");
> add(new Label("url" , Model.of(url)));
> If I open
> http://foobar:8080/quickstart/app/TestPage 
> it shows  http://foobar:8080/quickstart/app/TestPage  , correct 
> if I open http://foobar:8080/quickstart/app/TestPage/a/b/
> it shows : http://foobar:8080/quickstart/app/TestPage/a/b/ , correct
> BUT , 
> if I open http://foobar:8080/quickstart/app/TestPage/a/b
> it shows : http://foobar:8080/quickstart/app/TestPage/a , WRONG 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WICKET-2586) [1.4.3] RequestUtils.toAbsolutePath("") skips the last value

Posted by "Daan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783270#action_12783270 ] 

Daan edited comment on WICKET-2586 at 11/28/09 7:50 PM:
--------------------------------------------------------

It seems this is intended behavior, looking at the code in RequestUtils:

    // Remove everything after last slash (but not slash itself)
    result = new StringBuffer(requestPath.substring(0, requestPath.lastIndexOf('/') + 1));

      was (Author: stuq):
    It seems this is intended behavior, looking at the code in RequestUtils:

{code}
    // Remove everything after last slash (but not slash itself)
    result = new StringBuffer(requestPath.substring(0, requestPath.lastIndexOf('/') + 1));
{code}
  
> [1.4.3] RequestUtils.toAbsolutePath("") skips the last value
> ------------------------------------------------------------
>
>                 Key: WICKET-2586
>                 URL: https://issues.apache.org/jira/browse/WICKET-2586
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.3
>            Reporter: smallufo
>
> The code is following :
> WebApplication :
> mountBookmarkablePage("/TestPage" , TestPage.class);
> TestPage.html :
> url = <span wicket:id="url"></span>
> TestPage.java :
> final String url = RequestUtils.toAbsolutePath("");
> add(new Label("url" , Model.of(url)));
> If I open
> http://foobar:8080/quickstart/app/TestPage 
> it shows  http://foobar:8080/quickstart/app/TestPage  , correct 
> if I open http://foobar:8080/quickstart/app/TestPage/a/b/
> it shows : http://foobar:8080/quickstart/app/TestPage/a/b/ , correct
> BUT , 
> if I open http://foobar:8080/quickstart/app/TestPage/a/b
> it shows : http://foobar:8080/quickstart/app/TestPage/a , WRONG 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2586) [1.4.3] RequestUtils.toAbsolutePath("") skips the last value

Posted by "Daan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783270#action_12783270 ] 

Daan commented on WICKET-2586:
------------------------------

It seems this is intended behavior, looking at the code in RequestUtils:

{code}
    // Remove everything after last slash (but not slash itself)
    result = new StringBuffer(requestPath.substring(0, requestPath.lastIndexOf('/') + 1));
{code}

> [1.4.3] RequestUtils.toAbsolutePath("") skips the last value
> ------------------------------------------------------------
>
>                 Key: WICKET-2586
>                 URL: https://issues.apache.org/jira/browse/WICKET-2586
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.3
>            Reporter: smallufo
>
> The code is following :
> WebApplication :
> mountBookmarkablePage("/TestPage" , TestPage.class);
> TestPage.html :
> url = <span wicket:id="url"></span>
> TestPage.java :
> final String url = RequestUtils.toAbsolutePath("");
> add(new Label("url" , Model.of(url)));
> If I open
> http://foobar:8080/quickstart/app/TestPage 
> it shows  http://foobar:8080/quickstart/app/TestPage  , correct 
> if I open http://foobar:8080/quickstart/app/TestPage/a/b/
> it shows : http://foobar:8080/quickstart/app/TestPage/a/b/ , correct
> BUT , 
> if I open http://foobar:8080/quickstart/app/TestPage/a/b
> it shows : http://foobar:8080/quickstart/app/TestPage/a , WRONG 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.