Read this: http://cwiki.apache.org/WICKET/best-practices-and-gotchas.html#BestPracticesandGotchas-WicketServletMapping
There you can read that if you use the servlet mapping, you need to do it on a subpath, i.e. /app *and* add the asterisk: <servlet-mapping> <servlet-name>MreWicketApplication</servlet-name> <url-pattern>/app/*</url-pattern> </servlet-mapping> Martijn On 9/28/07, Adam A. Koch <[EMAIL PROTECTED]> wrote: > Here's the URL I'm trying: > http://localhost/mre/resources/com.*.webapp.wicket.BasePage/mre.css > > This (part of) the web.xml that works: > > <filter> > <filter-name>MreWicketApplication</filter-name> > > <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> > <init-param> > <param-name>applicationClassName</param-name> > > <param-value>com.[removed].mre.webapp.wicket.MreWebApplication</param-value> > </init-param> > </filter> > > <filter-mapping> > <filter-name>MreWicketApplication</filter-name> > <url-pattern>/*</url-pattern> > </filter-mapping> > > This is what doesn't work: > > <servlet> > <servlet-name>MreWicketApplication</servlet-name> > > <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class> > <init-param> > <param-name>applicationClassName</param-name> > > <param-value>com.[removed].mre.webapp.wicket.MreWebApplication</param-value> > </init-param> > <load-on-startup>1</load-on-startup> > </servlet> > > <servlet-mapping> > <servlet-name>MreWicketApplication</servlet-name> > <url-pattern>/</url-pattern> > </servlet-mapping> > > > But even though the url-pattern is "/" everything is under "/mre/". Is > that the way it's supposed to be? > > Thanks, > Adam > > Martijn Dashorst wrote: > > And perhaps post the contents of your web.xml? > > > > Did you map to /app or /app/* ? > > > > Martijn > > > > On 9/27/07, Adam A. Koch <[EMAIL PROTECTED]> wrote: > > > >> It is mapped to an app and not to the root. The directories I listed are > >> in > >> the war file, but I tried to access them with http://localhost/myapp/... > >> > >> Kent Tong wrote: > >> Adam Koch wrote: > >> > >> > >> In fact, I couldn't get the JS/CSS in any way when using the servlet. I > >> tried putting the JS in my app.war in these directories: > >> / (root) > >> /classes/com/.../someJS.js > >> /WEB-INF/classes/com/.../someJS.js (same directory as Class > >> and html) > >> > >> > >> Are you mapping the Wicket servlet to root? Try mapping it to something > >> else > >> like /app. > >> > >> --------------------------------------------------------------------- > >> 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] > > -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]