You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Linh Bui <li...@gmail.com> on 2014/03/16 16:50:53 UTC

Can't access to the resources bundled in external jar files

Hi,

I'm working on a project using Wicket 6.14. I created a separate Maven
project for all wicket plugins. This project uses JQuery UI 1.9.2. Then, I
declared this project as a dependency in my main project. After deploying
to JBoss AS, I noticed that the system generated a HTML file which includes
the following declarations in <header>:

<script
src="../wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392362624000.js"
type="text/javascript"></script>
<script
src="../wicket/resource/wicket.plugin.tokeninput.TokenInputAjaxBehavior/resources/jquery-ui-1.9.2.min-ver-1394982966000.js"
type="text/javascript"></script>

I could retrieve jquery-1.11.0 from the system by accessing to either of
the following addresses:

http://localhost:8080/mysystem-web/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392362624000.js
http://localhost:8080/mysystem-web/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0.js

However, I could only retrieve jquery-ui-1.9.2 from the system by accessing
to the following address:

http://localhost:8080/mysystem-web/wicket/resource/wicket.plugin.tokeninput.TokenInputAjaxBehavior/resources/jquery-ui-1.9.2.min.js

If I access:

http://localhost:8080/mysystem-web/wicket/resource/wicket.plugin.tokeninput.TokenInputAjaxBehavior/resources/jquery-ui-1.9.2.min-ver-1394982966000.js

I encounter this error:

HTTP Status 404 - Unable to find resource
type Status report
message Unable to find resource
description The requested resource (Unable to find resource) is not
available.
JBoss Web/7.0.13.Final

I have checked my local Maven repository and seen that the artifact for my
plugin project does include the jquery-ui-1.9.2.js file in the correct
package (wicket.plugin.tokeninput.resources).

Could any one give me a hint about this issue? Thank you very much.

Re: Can't access to the resources bundled in external jar files

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Put a breakpoint at
org.apache.wicket.core.request.mapper.BasicResourceReferenceMapper#mapRequest(Request)
and see what happens.
If you are able to reproduce it with a quickstart application then please
attach it to a ticket in Jira and we will check it.

Martin Grigorov
Wicket Training and Consulting


On Sun, Mar 16, 2014 at 5:50 PM, Linh Bui <li...@gmail.com> wrote:

> Hi,
>
> I'm working on a project using Wicket 6.14. I created a separate Maven
> project for all wicket plugins. This project uses JQuery UI 1.9.2. Then, I
> declared this project as a dependency in my main project. After deploying
> to JBoss AS, I noticed that the system generated a HTML file which includes
> the following declarations in <header>:
>
> <script
>
> src="../wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392362624000.js"
> type="text/javascript"></script>
> <script
>
> src="../wicket/resource/wicket.plugin.tokeninput.TokenInputAjaxBehavior/resources/jquery-ui-1.9.2.min-ver-1394982966000.js"
> type="text/javascript"></script>
>
> I could retrieve jquery-1.11.0 from the system by accessing to either of
> the following addresses:
>
>
> http://localhost:8080/mysystem-web/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392362624000.js
>
> http://localhost:8080/mysystem-web/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0.js
>
> However, I could only retrieve jquery-ui-1.9.2 from the system by accessing
> to the following address:
>
>
> http://localhost:8080/mysystem-web/wicket/resource/wicket.plugin.tokeninput.TokenInputAjaxBehavior/resources/jquery-ui-1.9.2.min.js
>
> If I access:
>
>
> http://localhost:8080/mysystem-web/wicket/resource/wicket.plugin.tokeninput.TokenInputAjaxBehavior/resources/jquery-ui-1.9.2.min-ver-1394982966000.js
>
> I encounter this error:
>
> HTTP Status 404 - Unable to find resource
> type Status report
> message Unable to find resource
> description The requested resource (Unable to find resource) is not
> available.
> JBoss Web/7.0.13.Final
>
> I have checked my local Maven repository and seen that the artifact for my
> plugin project does include the jquery-ui-1.9.2.js file in the correct
> package (wicket.plugin.tokeninput.resources).
>
> Could any one give me a hint about this issue? Thank you very much.
>