You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ann Baert (JIRA)" <ji...@apache.org> on 2012/12/03 11:53:58 UTC

[jira] [Created] (WICKET-4903) relativeUrl's begins with ./

Ann Baert created WICKET-4903:
---------------------------------

             Summary: relativeUrl's begins with ./
                 Key: WICKET-4903
                 URL: https://issues.apache.org/jira/browse/WICKET-4903
             Project: Wicket
          Issue Type: Bug
    Affects Versions: 6.1.0
            Reporter: Ann Baert


In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js

How can I fix this?

The url is made by Url.parse("/js/name.js").


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4903) relativeUrl's begins with ./

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

Martin Grigorov commented on WICKET-4903:
-----------------------------------------

> Our js need to have the same host and port as the wicket application, otherwise we have problems with crossside js loading.

But you rewrite  http://my.special.cdn.url/js/my.js to http://your.site.com/js/my.js, no ?
                
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>         Attachments: 4903.tgz, TestRelativeUrls.zip
>
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4903) relativeUrl's begins with ./

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

Ann Baert updated WICKET-4903:
------------------------------

    Attachment: TestRelativeUrls.zip
    
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>         Attachments: TestRelativeUrls.zip
>
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4903) relativeUrl's begins with ./

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

Martin Grigorov commented on WICKET-4903:
-----------------------------------------

Please provide a quickstart that demonstrates the use case.
The method name says that the result is a *relative* url. UrlRenderer also provides #renderFullUrl() and #renderContextRelativeUrl().
The change has been made for solving WICKET-4645.
                
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4903) relativeUrl's begins with ./

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

Martin Grigorov updated WICKET-4903:
------------------------------------

    Attachment: 4903.tgz

I believe what you need is something like this.
                
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>         Attachments: 4903.tgz, TestRelativeUrls.zip
>
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4903) relativeUrl's begins with ./

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

Sven Meier commented on WICKET-4903:
------------------------------------

Maybe the following line in your code is the cause of a misunderstanding:

            response.render(JavaScriptUrlReferenceHeaderItem.forReference(TestResourceReference.get()));

You're calling the static method *JavaScriptHeaderItem*#forReference(), probably thinking that this will generate an absolute Url as JavaScriptUrlReferenceHeaderItem's javadoc promises. But all this does is creating a JavaScriptReferenceHeaderItem, which uses a relative Url (as almost anything in Wicket).

                
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>         Attachments: TestRelativeUrls.zip
>
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4903) relativeUrl's begins with ./

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

Marieke Vandamme commented on WICKET-4903:
------------------------------------------

Is that something that can be solved at our side? 
Or should it be something provided through the wicket framework, a new method in JavaScriptUrlReferenceHeaderItem?

We need this functionality for all our javascript includes. Because this javascript doesn't reside in our project code and we don't want to run against crossdomain loading problem.

Thanks !
                
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>         Attachments: TestRelativeUrls.zip
>
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4903) relativeUrl's begins with ./

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

Marieke Vandamme commented on WICKET-4903:
------------------------------------------

Sorry for that !
It's sometimes hard for us to describe a usecase that is so clear for us, but indeed not always for somebody else.
Thanks for the time, and we'll try harder to explain in the future.

About the jira issue, we'll try with full url's instead. 
This worked in 1.5.8 and 6.0.0, so we thought it was a bug.
But now we know that it's just not supported anymore.
                
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>         Attachments: 4903.tgz, TestRelativeUrls.zip
>
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4903) relativeUrl's begins with ./

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

Marieke Vandamme commented on WICKET-4903:
------------------------------------------

Can it be made possible in wicket? This was the case before, and looking at other issues (f.e. WICKET-4502) we aren't the only ones needing it.
We have over more than 20 hostnames to support.
http://abc.mysite.com
http://def.mysite.com
..
The way you propose with the rewriting will be very hard to implement.
                
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>         Attachments: 4903.tgz, TestRelativeUrls.zip
>
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4903) relativeUrl's begins with ./

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

Martin Grigorov commented on WICKET-4903:
-----------------------------------------

Please give more details in the initial report. I spend my time debugging what is the use case.

Since you rewrite the url then I think you can use absolute urls like CDN ones - http://my.special.cdn.url/js/myjs.js. mod_rewite can transform this to whatever you actually need.
That is TestResourceReference should use UrlResourceReference dependencies with fully qualified urls like the one above.
                
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>         Attachments: 4903.tgz, TestRelativeUrls.zip
>
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4903) relativeUrl's begins with ./

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

Marieke Vandamme commented on WICKET-4903:
------------------------------------------

I think there is a misunderstanding..
Our javascript isn't inside our webapp-directory.

For example:
www.mysite.com/mywicketproject/index.html
www.mysite.com/js/myjs.js

But we don't want to include the js as "www.mysite.com/js/myjs.js", but as "/js/myjs.js".
The linking of the js is dealed with in apache / varnish.
                
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>         Attachments: 4903.tgz, TestRelativeUrls.zip
>
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4903) relativeUrl's begins with ./

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

Marieke Vandamme commented on WICKET-4903:
------------------------------------------

We've been looking further into it, and found WICKET-4502. 
There you propose to build the url in the IRequestMapper#mapHandler().
That's the way we tried to include the links with absolute urls too.
Our js need to have the same host and port as the wicket application, otherwise we have problems with crossside js loading.
We tried to render the url as full, by adding the host and port, but wicket removes it and makes it relative.
Thanks for looking into this once more.
                
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>         Attachments: 4903.tgz, TestRelativeUrls.zip
>
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (WICKET-4903) relativeUrl's begins with ./

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

Martin Grigorov edited comment on WICKET-4903 at 12/5/12 10:22 AM:
-------------------------------------------------------------------

Please give more details in the initial report. I spend my time debugging what is the use case.

Since you rewrite the url then I think you can use absolute urls like CDN ones - http://my.special.cdn.url/js/myjs.js. mod_rewrite can transform this to whatever you actually need.
That is TestResourceReference should use UrlResourceReference dependencies with fully qualified urls like the one above.
                
      was (Author: mgrigorov):
    Please give more details in the initial report. I spend my time debugging what is the use case.

Since you rewrite the url then I think you can use absolute urls like CDN ones - http://my.special.cdn.url/js/myjs.js. mod_rewite can transform this to whatever you actually need.
That is TestResourceReference should use UrlResourceReference dependencies with fully qualified urls like the one above.
                  
> relativeUrl's begins with ./
> ----------------------------
>
>                 Key: WICKET-4903
>                 URL: https://issues.apache.org/jira/browse/WICKET-4903
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.0
>            Reporter: Ann Baert
>         Attachments: 4903.tgz, TestRelativeUrls.zip
>
>
> In method renderRelativeUrl in UrlRenderer the check url.isAbsolute() is removed. For wich reason is this removed? Because now our relativeurls link /js/name.js are rendered ./js/name.js
> How can I fix this?
> The url is made by Url.parse("/js/name.js").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira