Actions
Bug #2175
closed
KD
serving wt-resources with WtServlet
Bug #2175:
serving wt-resources with WtServlet
Start date:
09/04/2013
Due date:
% Done:
0%
Estimated time:
Description
Following a discussion with Koen on the ml, here is an issue to check if the WtServlet serves wt-resources correctly.
I had to implement it this way in Jruby:
@server = Server.new(8080)
# get external path for resources in jar
static_content=@server.getClass().getClassLoader().getResource("eu/webtoolkit/jwt/wt-resources").toExternalForm()
# create a web context, and define where the resources will be available
# the prefix has to be the same as for the servlet holder below
web_context=WebAppContext.new(static_content, '/wt-resources')
context = ServletContextHandler.new(ServletContextHandler::SESSIONS)
context.addEventListener(ServletInit.new);
servlet = HelloMain.new()
holder = ServletHolder.new(servlet)
context.addServlet(holder, '/')
handler_list= HandlerList.new
handler_list.setHandlers([web_context,context])
@server.setHandler(handler_list);
KD Updated by Koen Deforche almost 13 years ago
- Status changed from New to Resolved
- Assignee set to Koen Deforche
- Target version set to 3.3.1
KD Updated by Koen Deforche almost 13 years ago
- Status changed from Resolved to Closed
Actions