I normally use the following:
mountBookmarkablePage("/pages", LandingPage.class);

But your problem seems to originate somewhere else. Which Wicket version 
are you using? I remember vaguely that you need to explicitly set the 
thread context variables (that contain a reference to the application) 
for Wicket 2.0. I am not using that version so I can not quickly tell 
you how to do that.

Regards,
     Erik.


Neil Grover wrote:
> I would like to clean up my url's and came across a section in the Pro
> Wicket PDF that said I could accomplish just that by doing the following
> in my Application class:
>
> public void init() {
>
>         super.init();
>         // url re-write to make things easier on the eyes
>         mount("/pages",
> PackageName.forPackage(LandingPage.class.getPackage()));
> }
>
> The problem is, now that I've done that I get an Exception thrown when
> it forwards to the re-formatted url. The exception is shown below:
>
> wicket.WicketRuntimeException: There is no application attached to current
> thread resin-tcp-connection-*:8080-1
>       at wicket.Application.get(Application.java:163)
>       at wicket.Session.getApplication(Session.java:289)
>       at
> wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:60)
>       at
> wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76)
>       at wicket.RequestCycle.step(RequestCycle.java:1050)
>       at wicket.RequestCycle.steps(RequestCycle.java:1084)
>       at wicket.RequestCycle.request(RequestCycle.java:454)
>       at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
>       at
> com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
>       at com.bci.car.filters.gzip.GZIPFilter.doFilter(GZIPFilter.java:28)
>       at
> com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
>       at
> com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
>       at
> com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
>       at 
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
>       at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511)
>       at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
>       at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
>       at java.lang.Thread.run(Thread.java:619)
>
>
> Is this a Resin problem? A wicket problem? Or am I an idiot problem?
>
> Thanks
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>   

-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to