Re: Wicket 1.5 adding a resource used from css?
I am not sure right now what is wrong with this case but you can also mount the resource with ResourceMapper at any path you want. File a bug for this failing case. On Tue, Sep 14, 2010 at 9:10 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi I've been wondering how I can add a resource used from the css (I cant seem to remember how to do it).. This is what I have : public class WicketApplication extends WebApplication { /** * Constructor */ public WicketApplication() { } @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); getSharedResources().add( border-radius.htc, new PackageResourceReference(WallboardParentPage.class, border-radius.htc).getResource()); } CSS: .title { width:98%; margin:5px auto; padding:5px; border: 1px solid #d7d7d7; background-color: #f0f0f0; -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; behavior: url(border-radius.htc); } } And when I goto this url, I can see the htc: http://localhost:8080/wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc And here there are some of the log messages: 09:06:21.999 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] WARN o.a.wicket.util.lang.WicketObjects - Could not resolve class: border-radius.htc 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=wicket/bookmarkable/border-radius.htc 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call servlet default 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc.gz 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - resource=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESPONSE /wicket/bookmarkable/border-radius.htc 404 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - REQUEST /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc on org.mortbay.jetty.httpconnect...@c1fea5 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - Got Session ID mle2763mc74f from cookie 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - sessionmanager=org.mortbay.jetty.servlet.hashsessionmana...@bfbdb0 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - session=org.mortbay.jetty.servlet.HashSessionManager$Session:mle2763mc...@23571417 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - servlet=default 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - chain=wicket.WicketWarp-default 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - servlet holder=default 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - call filter
Re: Wicket 1.5 adding a resource used from css?
How do I do it with resourcemapper..? Im wondering if I am giving the wrong path for the resource somehow? 2010/9/14 Martin Grigorov mgrigo...@apache.org: I am not sure right now what is wrong with this case but you can also mount the resource with ResourceMapper at any path you want. File a bug for this failing case. On Tue, Sep 14, 2010 at 9:10 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi I've been wondering how I can add a resource used from the css (I cant seem to remember how to do it).. This is what I have : public class WicketApplication extends WebApplication { /** * Constructor */ public WicketApplication() { } �...@override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); getSharedResources().add( border-radius.htc, new PackageResourceReference(WallboardParentPage.class, border-radius.htc).getResource()); } CSS: .title { width:98%; margin:5px auto; padding:5px; border: 1px solid #d7d7d7; background-color: #f0f0f0; -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; behavior: url(border-radius.htc); } } And when I goto this url, I can see the htc: http://localhost:8080/wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc And here there are some of the log messages: 09:06:21.999 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] WARN o.a.wicket.util.lang.WicketObjects - Could not resolve class: border-radius.htc 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=wicket/bookmarkable/border-radius.htc 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call servlet default 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc.gz 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - resource=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESPONSE /wicket/bookmarkable/border-radius.htc 404 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - REQUEST /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc on org.mortbay.jetty.httpconnect...@c1fea5 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - Got Session ID mle2763mc74f from cookie 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - sessionmanager=org.mortbay.jetty.servlet.hashsessionmana...@bfbdb0 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - session=org.mortbay.jetty.servlet.HashSessionManager$Session:mle2763mc...@23571417 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - servlet=default 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - chain=wicket.WicketWarp-default 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - servlet holder=default
Re: Wicket 1.5 adding a resource used from css?
I had to tell you that ResourceMapper is available only in 1.5-m2.1 (currently voted) The usage is quite simple: MyApp#init() { super.init(); getRootRequestMapperAsCompound().add(new ResourceMapper(mount/path, resourceReference)); } On Tue, Sep 14, 2010 at 9:52 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: How do I do it with resourcemapper..? Im wondering if I am giving the wrong path for the resource somehow? 2010/9/14 Martin Grigorov mgrigo...@apache.org: I am not sure right now what is wrong with this case but you can also mount the resource with ResourceMapper at any path you want. File a bug for this failing case. On Tue, Sep 14, 2010 at 9:10 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi I've been wondering how I can add a resource used from the css (I cant seem to remember how to do it).. This is what I have : public class WicketApplication extends WebApplication { /** * Constructor */ public WicketApplication() { } @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); getSharedResources().add( border-radius.htc, new PackageResourceReference(WallboardParentPage.class, border-radius.htc).getResource()); } CSS: .title { width:98%; margin:5px auto; padding:5px; border: 1px solid #d7d7d7; background-color: #f0f0f0; -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; behavior: url(border-radius.htc); } } And when I goto this url, I can see the htc: http://localhost:8080/wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc And here there are some of the log messages: 09:06:21.999 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] WARN o.a.wicket.util.lang.WicketObjects - Could not resolve class: border-radius.htc 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=wicket/bookmarkable/border-radius.htc 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call servlet default 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc.gz 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - resource=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 09:06:22.030 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESPONSE /wicket/bookmarkable/border-radius.htc 404 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - REQUEST /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc on org.mortbay.jetty.httpconnect...@c1fea5 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - Got Session ID mle2763mc74f from cookie 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - sessionmanager=org.mortbay.jetty.servlet.hashsessionmana...@bfbdb0 09:07:05.165 [22752...@qtp-11403277-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] DEBUG org.mortbay.log - session=org.mortbay.jetty.servlet.HashSessionManager$Session:mle2763mc...@23571417 09:07:05.165 [22752...@qtp-11403277-2 -
Re: Wicket 1.5 adding a resource used from css?
Yeah it is simple, doing this: @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); ResourceMapper htcResourceMapper = new ResourceMapper(/resources/, new PackageResourceReference(WallboardParentPage.class, border-radius.htc)); getRootRequestMapperAsCompound().add(htcResourceMapper); } And when I hit this url: http://localhost:8080/resources/border-radius.htc or http://localhost:8080/wicket/resources/border-radius.htc I get a 404, and this comes in the log: 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call servlet default 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc.gz 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - resource=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESPONSE /resources/border-radius.htc 404 10:18:48.626 [25516...@qtp-11596093-0] DEBUG org.mortbay.log - EOF 2010/9/14 Martin Grigorov mgrigo...@apache.org: I had to tell you that ResourceMapper is available only in 1.5-m2.1 (currently voted) The usage is quite simple: MyApp#init() { super.init(); getRootRequestMapperAsCompound().add(new ResourceMapper(mount/path, resourceReference)); } On Tue, Sep 14, 2010 at 9:52 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: How do I do it with resourcemapper..? Im wondering if I am giving the wrong path for the resource somehow? 2010/9/14 Martin Grigorov mgrigo...@apache.org: I am not sure right now what is wrong with this case but you can also mount the resource with ResourceMapper at any path you want. File a bug for this failing case. On Tue, Sep 14, 2010 at 9:10 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi I've been wondering how I can add a resource used from the css (I cant seem to remember how to do it).. This is what I have : public class WicketApplication extends WebApplication { /** * Constructor */ public WicketApplication() { } �...@override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); getSharedResources().add( border-radius.htc, new PackageResourceReference(WallboardParentPage.class, border-radius.htc).getResource()); } CSS: .title { width:98%; margin:5px auto; padding:5px; border: 1px solid #d7d7d7; background-color: #f0f0f0; -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; behavior: url(border-radius.htc); } } And when I goto this url, I can see the htc: http://localhost:8080/wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc And here there are some of the log messages: 09:06:21.999 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] WARN o.a.wicket.util.lang.WicketObjects - Could not resolve class: border-radius.htc 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found.
Re: Wicket 1.5 adding a resource used from css?
On Tue, Sep 14, 2010 at 10:22 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Yeah it is simple, doing this: @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); ResourceMapper htcResourceMapper = new ResourceMapper(/resources/, new PackageResourceReference(WallboardParentPage.class, border-radius.htc)); getRootRequestMapperAsCompound().add(htcResourceMapper); } And when I hit this url: http://localhost:8080/resources/border-radius.htc or I think the url should be http://localhost:8080/resources/ This is what you gave as mountPath See ResourceMapperTest http://localhost:8080/wicket/resources/border-radius.htc I get a 404, and this comes in the log: 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call servlet default 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc.gz 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - resource=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESPONSE /resources/border-radius.htc 404 10:18:48.626 [25516...@qtp-11596093-0] DEBUG org.mortbay.log - EOF 2010/9/14 Martin Grigorov mgrigo...@apache.org: I had to tell you that ResourceMapper is available only in 1.5-m2.1 (currently voted) The usage is quite simple: MyApp#init() { super.init(); getRootRequestMapperAsCompound().add(new ResourceMapper(mount/path, resourceReference)); } On Tue, Sep 14, 2010 at 9:52 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: How do I do it with resourcemapper..? Im wondering if I am giving the wrong path for the resource somehow? 2010/9/14 Martin Grigorov mgrigo...@apache.org: I am not sure right now what is wrong with this case but you can also mount the resource with ResourceMapper at any path you want. File a bug for this failing case. On Tue, Sep 14, 2010 at 9:10 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi I've been wondering how I can add a resource used from the css (I cant seem to remember how to do it).. This is what I have : public class WicketApplication extends WebApplication { /** * Constructor */ public WicketApplication() { } @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); getSharedResources().add( border-radius.htc, new PackageResourceReference(WallboardParentPage.class, border-radius.htc).getResource()); } CSS: .title { width:98%; margin:5px auto; padding:5px; border: 1px solid #d7d7d7; background-color: #f0f0f0; -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; behavior: url(border-radius.htc); } } And when I goto this url, I can see the htc: http://localhost:8080/wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc And here there are some of the log messages: 09:06:21.999 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 09:06:22.014 [26109...@qtp-11403277-3 -
Re: Wicket 1.5 adding a resource used from css?
Ok fixing it so it should work by doing this: CSS: behavior: url(../../resource/border-radius.htc); Java @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); ResourceMapper htcResourceMapper = new ResourceMapper( /resource/border-radius.htc, new PackageResourceReference( WallboardParentPage.class, border-radius.htc)); getRootRequestMapperAsCompound().add(htcResourceMapper); } Gives strangeness in the log (and does work when hit directly from browser, but not when referenced from css): 11:42:25.837 [19386...@qtp-9605638-2 - /wicket/bookmarkable/com.netdesign.wallboard.HomePage?0] DEBUG org.mortbay.log - RESPONSE /wicket/bookmarkable/com.netdesign.wallboard.HomePage 200 11:42:25.837 [19386...@qtp-9605638-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/standardDisplay-ts1284457193055.css] DEBUG org.mortbay.log - REQUEST /wicket/resource/com.netdesign.wallboard.WallboardParentPage/standardDisplay-ts1284457193055.css on org.mortbay.jetty.httpconnect...@c5da6 11:42:25.837 [11403...@qtp-9605638-0 - /wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ts1284358747180.js] DEBUG org.mortbay.log - REQUEST /wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ts1284358747180.js on org.mortbay.jetty.httpconnect...@17535b6 11:42:25.837 [19386...@qtp-9605638-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/standardDisplay-ts1284457193055.css] DEBUG org.mortbay.log - Got Session ID oqnifrnitgf3 from cookie 11:42:25.837 [11403...@qtp-9605638-0 - /wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ts1284358747180.js] DEBUG org.mortbay.log - Got Session ID oqnifrnitgf3 from cookie 11:42:25.837 [19386...@qtp-9605638-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/standardDisplay-ts1284457193055.css] DEBUG org.mortbay.log - sessionmanager=org.mortbay.jetty.servlet.hashsessionmana...@2a340e 11:42:25.837 [11403...@qtp-9605638-0 - /wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ts1284358747180.js] DEBUG org.mortbay.log - sessionmanager=org.mortbay.jetty.servlet.hashsessionmana...@2a340e 11:42:25.837 [11403...@qtp-9605638-0 - /wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ts1284358747180.js] DEBUG org.mortbay.log - session=org.mortbay.jetty.servlet.HashSessionManager$Session:oqnifrnit...@15666395 11:42:25.837 [19386...@qtp-9605638-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/standardDisplay-ts1284457193055.css] DEBUG org.mortbay.log - session=org.mortbay.jetty.servlet.HashSessionManager$Session:oqnifrnit...@15666395 11:42:25.837 [11403...@qtp-9605638-0 - /wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ts1284358747180.js] DEBUG org.mortbay.log - servlet=default 11:42:25.837 [19386...@qtp-9605638-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/standardDisplay-ts1284457193055.css] DEBUG org.mortbay.log - servlet=default 11:42:25.837 [11403...@qtp-9605638-0 - /wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ts1284358747180.js] DEBUG org.mortbay.log - chain=wicket.WicketWarp-default 11:42:25.837 [19386...@qtp-9605638-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/standardDisplay-ts1284457193055.css] DEBUG org.mortbay.log - chain=wicket.WicketWarp-default 11:42:25.837 [11403...@qtp-9605638-0 - /wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ts1284358747180.js] DEBUG org.mortbay.log - servlet holder=default 11:42:25.837 [19386...@qtp-9605638-2 - /wicket/resource/com.netdesign.wallboard.WallboardParentPage/standardDisplay-ts1284457193055.css] DEBUG org.mortbay.log - servlet holder=default 11:42:25.837 [11403...@qtp-9605638-0 - /wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ts1284358747180.js] DEBUG org.mortbay.log - call filter wicket.WicketWarp 11:42:25.837 [11403...@qtp-9605638-0 - /wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ts1284358747180.js] DEBUG o.a.w.u.r.l.ResourceStreamLocator - Attempting to locate resource 'org/apache/wicket/markup/html/wicket-event.js' on path [folders = [], webapppaths: []] 11:42:25.837 [11403...@qtp-9605638-0 - /wicket/resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event-ts1284358747180.js] DEBUG o.a.w.u.r.l.ResourceStreamLocator - Attempting to locate resource 'org/apache/wicket/markup/html/wicket-event.js' using classloader sun.misc.launcher$appclassloa...@11b86e7 11:42:25.837 [19386...@qtp-9605638-2 -
Re: Wicket 1.5 adding a resource used from css?
Am 14.09.2010 um 11:11 schrieb Martin Grigorov: On Tue, Sep 14, 2010 at 10:22 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Yeah it is simple, doing this: @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); ResourceMapper htcResourceMapper = new ResourceMapper(/resources/, new PackageResourceReference(WallboardParentPage.class, border-radius.htc)); getRootRequestMapperAsCompound().add(htcResourceMapper); } And when I hit this url: http://localhost:8080/resources/border-radius.htc or I think the url should be http://localhost:8080/resources/ This is what you gave as mountPath See ResourceMapperTest http://localhost:8080/wicket/resources/border-radius.htc I get a 404, and this comes in the log: 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call servlet default 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc.gz 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - resource=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESPONSE /resources/border-radius.htc 404 10:18:48.626 [25516...@qtp-11596093-0] DEBUG org.mortbay.log - EOF 2010/9/14 Martin Grigorov mgrigo...@apache.org: I had to tell you that ResourceMapper is available only in 1.5-m2.1 (currently voted) The usage is quite simple: MyApp#init() { super.init(); getRootRequestMapperAsCompound().add(new ResourceMapper(mount/path, resourceReference)); } On Tue, Sep 14, 2010 at 9:52 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: How do I do it with resourcemapper..? Im wondering if I am giving the wrong path for the resource somehow? 2010/9/14 Martin Grigorov mgrigo...@apache.org: I am not sure right now what is wrong with this case but you can also mount the resource with ResourceMapper at any path you want. File a bug for this failing case. On Tue, Sep 14, 2010 at 9:10 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi I've been wondering how I can add a resource used from the css (I cant seem to remember how to do it).. This is what I have : public class WicketApplication extends WebApplication { /** * Constructor */ public WicketApplication() { } @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); getSharedResources().add( border-radius.htc, new PackageResourceReference(WallboardParentPage.class, border-radius.htc).getResource()); } CSS: .title { width:98%; margin:5px auto; padding:5px; border: 1px solid #d7d7d7; background-color: #f0f0f0; -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; behavior: url(border-radius.htc); } } And when I goto this url, I can see the htc: http://localhost:8080/wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc And here there are some of the log messages: 09:06:21.999 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 09:06:22.014 [26109...@qtp-11403277-3 - /wicket/bookmarkable/border-radius.htc] WARN o.a.wicket.util.lang.WicketObjects - Could
Re: Wicket 1.5 adding a resource used from css?
-- I would not recommend tailing slashes for resources names. -- The mount path is not a prefix to the resource but a full path, you probably want this instead: getRootRequestMapperAsCompound().add(new ResourceMapper(/resources/border-radius.htc, new PackageResourceReference(WallpagerParentPage.class, border-radius.htc))) -- If 'border-radius.htc' is included from a stylesheet in the same package where WallpagerParentPage.class is located it's sufficient to put border-radius.htc in the same package and refer it like this from CSS: stylesheet inside WallpaperParentPage.class package: . behavior:url(border-radius.htc) . In this case you don't even need to mount the resource at all. -- You should avoid to use '..' for url's inside CSS ... it probably will not work! Am 14.09.2010 um 11:49 schrieb Peter Ertl: Am 14.09.2010 um 11:11 schrieb Martin Grigorov: On Tue, Sep 14, 2010 at 10:22 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Yeah it is simple, doing this: @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); ResourceMapper htcResourceMapper = new ResourceMapper(/resources/, new PackageResourceReference(WallboardParentPage.class, border-radius.htc)); getRootRequestMapperAsCompound().add(htcResourceMapper); } And when I hit this url: http://localhost:8080/resources/border-radius.htc or I think the url should be http://localhost:8080/resources/ This is what you gave as mountPath See ResourceMapperTest http://localhost:8080/wicket/resources/border-radius.htc I get a 404, and this comes in the log: 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call servlet default 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc.gz 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - resource=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESPONSE /resources/border-radius.htc 404 10:18:48.626 [25516...@qtp-11596093-0] DEBUG org.mortbay.log - EOF 2010/9/14 Martin Grigorov mgrigo...@apache.org: I had to tell you that ResourceMapper is available only in 1.5-m2.1 (currently voted) The usage is quite simple: MyApp#init() { super.init(); getRootRequestMapperAsCompound().add(new ResourceMapper(mount/path, resourceReference)); } On Tue, Sep 14, 2010 at 9:52 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: How do I do it with resourcemapper..? Im wondering if I am giving the wrong path for the resource somehow? 2010/9/14 Martin Grigorov mgrigo...@apache.org: I am not sure right now what is wrong with this case but you can also mount the resource with ResourceMapper at any path you want. File a bug for this failing case. On Tue, Sep 14, 2010 at 9:10 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi I've been wondering how I can add a resource used from the css (I cant seem to remember how to do it).. This is what I have : public class WicketApplication extends WebApplication { /** * Constructor */ public WicketApplication() { } @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); getSharedResources().add( border-radius.htc, new
Re: Wicket 1.5 adding a resource used from css?
Yeah this was my starting point. But it did not work heres the log msg: 12:06:08.309 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 12:06:08.309 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] WARN o.a.wicket.util.lang.WicketObjects - Could not resolve class: border-radius.htc 12:06:08.309 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=wicket/bookmarkable/border-radius.htc 12:06:08.309 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call servlet default 12:06:08.324 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc.gz 12:06:08.324 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 12:06:08.324 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 12:06:08.324 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - resource=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 12:06:08.324 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESPONSE /wicket/bookmarkable/border-radius.htc 404 I guess I should create a quickstart as Martin mentioned and file a bug? 2010/9/14 Peter Ertl pe...@gmx.org: -- I would not recommend tailing slashes for resources names. -- The mount path is not a prefix to the resource but a full path, you probably want this instead: getRootRequestMapperAsCompound().add(new ResourceMapper(/resources/border-radius.htc, new PackageResourceReference(WallpagerParentPage.class, border-radius.htc))) -- If 'border-radius.htc' is included from a stylesheet in the same package where WallpagerParentPage.class is located it's sufficient to put border-radius.htc in the same package and refer it like this from CSS: stylesheet inside WallpaperParentPage.class package: . behavior:url(border-radius.htc) . In this case you don't even need to mount the resource at all. -- You should avoid to use '..' for url's inside CSS ... it probably will not work! Am 14.09.2010 um 11:49 schrieb Peter Ertl: Am 14.09.2010 um 11:11 schrieb Martin Grigorov: On Tue, Sep 14, 2010 at 10:22 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Yeah it is simple, doing this: @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); ResourceMapper htcResourceMapper = new ResourceMapper(/resources/, new PackageResourceReference(WallboardParentPage.class, border-radius.htc)); getRootRequestMapperAsCompound().add(htcResourceMapper); } And when I hit this url: http://localhost:8080/resources/border-radius.htc or I think the url should be http://localhost:8080/resources/ This is what you gave as mountPath See ResourceMapperTest http://localhost:8080/wicket/resources/border-radius.htc I get a 404, and this comes in the log: 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call servlet default 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc.gz 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log -
Re: Wicket 1.5 adding a resource used from css?
Did you put 'border-radius.htc' in the same package where this CSS is located? How your refer to the CSS from your page? Do you use wicket:link or response.renderCSSReference(...) ? Can you paste your code to some pastebin and post the link here? Am 14.09.2010 um 09:10 schrieb nino martinez wael: .title { width:98%; margin:5px auto; padding:5px; border: 1px solid #d7d7d7; background-color: #f0f0f0; -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; behavior: url(border-radius.htc); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 adding a resource used from css?
here : https://issues.apache.org/jira/browse/WICKET-3046 2010/9/14 nino martinez wael nino.martinez.w...@gmail.com: Yeah this was my starting point. But it did not work heres the log msg: 12:06:08.309 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 12:06:08.309 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] WARN o.a.wicket.util.lang.WicketObjects - Could not resolve class: border-radius.htc 12:06:08.309 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=wicket/bookmarkable/border-radius.htc 12:06:08.309 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - call servlet default 12:06:08.324 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc.gz 12:06:08.324 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 12:06:08.324 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 12:06:08.324 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - resource=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/wicket/bookmarkable/border-radius.htc 12:06:08.324 [13389...@qtp-9605638-3 - /wicket/bookmarkable/border-radius.htc] DEBUG org.mortbay.log - RESPONSE /wicket/bookmarkable/border-radius.htc 404 I guess I should create a quickstart as Martin mentioned and file a bug? 2010/9/14 Peter Ertl pe...@gmx.org: -- I would not recommend tailing slashes for resources names. -- The mount path is not a prefix to the resource but a full path, you probably want this instead: getRootRequestMapperAsCompound().add(new ResourceMapper(/resources/border-radius.htc, new PackageResourceReference(WallpagerParentPage.class, border-radius.htc))) -- If 'border-radius.htc' is included from a stylesheet in the same package where WallpagerParentPage.class is located it's sufficient to put border-radius.htc in the same package and refer it like this from CSS: stylesheet inside WallpaperParentPage.class package: . behavior:url(border-radius.htc) . In this case you don't even need to mount the resource at all. -- You should avoid to use '..' for url's inside CSS ... it probably will not work! Am 14.09.2010 um 11:49 schrieb Peter Ertl: Am 14.09.2010 um 11:11 schrieb Martin Grigorov: On Tue, Sep 14, 2010 at 10:22 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Yeah it is simple, doing this: @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); ResourceMapper htcResourceMapper = new ResourceMapper(/resources/, new PackageResourceReference(WallboardParentPage.class, border-radius.htc)); getRootRequestMapperAsCompound().add(htcResourceMapper); } And when I hit this url: http://localhost:8080/resources/border-radius.htc or I think the url should be http://localhost:8080/resources/ This is what you gave as mountPath See ResourceMapperTest http://localhost:8080/wicket/resources/border-radius.htc I get a 404, and this comes in the log: 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call filter wicket.WicketWarp 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No suitable RequestHandler found. URL=resources/border-radius.htc 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - call servlet default 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log - RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc.gz 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc] DEBUG org.mortbay.log -
Re: Wicket 1.5 adding a resource used from css?
Yes put the border-radius.htc in the same package and used the response.renderCSSReference(...)... 2010/9/14 Peter Ertl pe...@gmx.org: Did you put 'border-radius.htc' in the same package where this CSS is located? How your refer to the CSS from your page? Do you use wicket:link or response.renderCSSReference(...) ? Can you paste your code to some pastebin and post the link here? Am 14.09.2010 um 09:10 schrieb nino martinez wael: .title { width:98%; margin:5px auto; padding:5px; border: 1px solid #d7d7d7; background-color: #f0f0f0; -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; behavior: url(border-radius.htc); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org