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 <[email protected]>: > -- 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 < >>> [email protected]> 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 <[email protected]>: >>>>> 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 < >>>>> [email protected]> 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 <[email protected]>: >>>>>>> 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 < >>>>>>> [email protected]> 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 wicket.WicketWarp >>>>>>>> 09:07:05.165 [22752...@qtp-11403277-2 - >>>>>>>> >>>>>>>> >>>>>> >>>> /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] >>>>>>>> DEBUG o.a.w.u.r.l.ResourceStreamLocator - Attempting to locate >>>>>>>> resource 'com/netdesign/wallboard/border-radius.htc' on path [folders >>>>>>>> = [], webapppaths: []] >>>>>>>> 09:07:05.165 [22752...@qtp-11403277-2 - >>>>>>>> >>>>>>>> >>>>>> >>>> /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] >>>>>>>> DEBUG o.a.w.u.r.l.ResourceStreamLocator - Attempting to locate >>>>>>>> resource 'com/netdesign/wallboard/border-radius.htc' using >>>> classloader >>>>>>>> sun.misc.launcher$appclassloa...@11b86e7 >>>>>>>> 09:07:05.228 [22752...@qtp-11403277-2 - >>>>>>>> >>>>>>>> >>>>>> >>>> /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] >>>>>>>> DEBUG o.a.w.u.r.l.ResourceStreamLocator - Attempting to locate >>>>>>>> resource 'com/netdesign/wallboard/border-radius.htc' on path [folders >>>>>>>> = [], webapppaths: []] >>>>>>>> 09:07:05.228 [22752...@qtp-11403277-2 - >>>>>>>> >>>>>>>> >>>>>> >>>> /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] >>>>>>>> DEBUG o.a.w.u.r.l.ResourceStreamLocator - Attempting to locate >>>>>>>> resource 'com/netdesign/wallboard/border-radius.htc' using >>>> classloader >>>>>>>> sun.misc.launcher$appclassloa...@11b86e7 >>>>>>>> 09:07:05.228 [22752...@qtp-11403277-2 - >>>>>>>> >>>>>>>> >>>>>> >>>> /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc] >>>>>>>> DEBUG org.mortbay.log - RESPONSE >>>>>>>> >>>>>>>> >>>>>> >>>> /wicket/resource/com.netdesign.wallboard.WallboardParentPage/border-radius.htc >>>>>>>> 200 >>>>>>>> >>>>>>>> --------------------------------------------------------------------- >>>>>>>> To unsubscribe, e-mail: [email protected] >>>>>>>> For additional commands, e-mail: [email protected] >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe, e-mail: [email protected] >>>>>> For additional commands, e-mail: [email protected] >>>>>> >>>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [email protected] >>>> For additional commands, e-mail: [email protected] >>>> >>>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
