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 -
> >>
> >>
> /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: 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
>
>

Reply via email to