Hey Raphael,

2013/8/29 Raphael Bauduin <rbli...@gmail.com>

> Hi,
>
> I'm using JWt with Jruby and Jetty.
> I'm initialising my app with this code:
>
>     @server = Server.new(8080)
>     context = ServletContextHandler.new(ServletContextHandler::SESSIONS)
>     context.setContextPath("/");
>     context.addEventListener(ServletInit.new);
>     @server.setHandler(context);
>
>     servlet = HelloMain.new()
>     holder = ServletHolder.new(servlet)
>     context.addServlet(holder, '/')
>     @server.start
>
> A request is sent for
> http://localhost:8080/wt-resources/themes/default/wt.css , but the
> response received is html:
>
>
You are getting the response from the application servlet, rather than for
a static resource. That's because you configure jetty to let the servlet
handle all requests under "/".

You need to either explain Jetty to give priority to static files (I'm not
sure if that can be done), or deploy the application at a more specific
path (e.g. addServlet(holder, "/app/*")).

Regards,
koen
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to