Thanks for the suggestion, but I'm unclear on how to mount the home page on "/". I guess that is the main problem I'm having. Before adding PageParameters to the page, I used this: mountBookmarkablePage("/home", HomePage.class);
With that, going to localhost:8080/ would redirect to localhost:8080/home. Then I changed it to the following: mount(new IndexedParamUrlCodingStrategy("/home", HomePage.class)); // mountBookmarkablePage("/home", HomePage.class); Everything still worked the same (going to site root would redirect to /home), but it would also accept parameters. Functions perfectly, but I need to get rid of the /home mount point. So I tried this: mount(new IndexedParamUrlCodingStrategy("/", HomePage.class)); // mount(new IndexedParamUrlCodingStrategy("/home", HomePage.class)); // mountBookmarkablePage("/home", HomePage.class); Doing so gives a 404 error when I go to the root of the site. So how do I mount the home page on "/"? I tried both "" and "/". MyWebApplication: public Class<? extends WebPage> getHomePage() { return HomePage.class; } protected void init() { super.init(); mount(new IndexedParamUrlCodingStrategy("/", HomePage.class)); // mount(new IndexedParamUrlCodingStrategy("/home", HomePage.class)); // mountBookmarkablePage("/home", HomePage.class); } Jetty launcher code (for testing): WebAppContext context = new WebAppContext(); context.setServer(server); context.setContextPath("/"); context.setWar("src/webapp"); web.xml: <servlet> <servlet-name>wicketsite</servlet-name> <servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class> <init-param> <param-name>applicationFactoryClassName</param-name> <param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>wicketsite</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> Thanks for the help! Tauren On Thu, Jun 26, 2008 at 3:38 PM, David Leangen <[EMAIL PROTECTED]> wrote: > > IIUC, the home page is automatically mounted on the path where you wicket > app is located. > > So, if you put your wicket on "/home", then the home page will be mounted on > /home. > > Guess you'll need to put your home page on "/" to make this work. > > >> -----Original Message----- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of >> Tauren Mills >> Sent: 27 June 2008 07:30 >> To: users@wicket.apache.org >> Subject: Home page accepting IndexedParamUrlCodingStrategy >> >> >> How do I go about making my HomePage accept index parameters? I want >> a home page that will accept URLs like: >> localhost:8080/us/ca/sacramento >> >> Instead of having a mount point first, for example /home: >> localhost:8080/home/us/ca/sacramento >> >> I've tried this in my app: >> >> getHomePage() { >> return HomePage.class; >> } >> init() { >> mount(new IndexedParamUrlCodingStrategy("/", HomePage.class)); >> } >> >> This returns in a 404 error for the home page (localhost:8080/). I >> also tried with "" instead of "/" as the mount point, but the same >> problem. >> >> If I use this with the /home mount point, everything works perfectly: >> mount(new IndexedParamUrlCodingStrategy("/home", HomePage.class)); >> >> FYI... I get the PageParameters in HomePage like this (which is >> working fine); >> >> setCountry(pageParams.getString("0",null)); >> setState(pageParams.getString("1",null)); >> setCity(pageParams.getString("2",null)); >> >> Any suggestions? >> >> Thanks, >> Tauren >> >> --------------------------------------------------------------------- >> 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]