Hi,
i just wrote a application in Java and i used the Jetty Embedded Server to provide the servlet. The application provided by the servlet generates multiple .png files by running the command line. This works fine.
The servlet also generates the html output with the
![]()
links to the .png files and here is the problem. The displays cannot be found, but i can see them in the filesystem.
So i just need another context to store the images in. Ive seen that in jetty 5:
HttpContext imageContext = new HttpContext();
imageContext.setContextPath("/images");
imageContext.setResourceBase(".");
imageContext.addHandler(new ResourceHandler());
server.addContext(imageContext);
But i cant implement that in Jetty 6. There is no httpContext Class anymore and i cant set the ResourceBase. So the question is, how to transform the upper code fragment into a embedded jetty 6 equivalent. I hope that anybody can help me, because im out of ideas after worlking the whole night.
Regards,
Grinarn
P.S.: The code fragment where i genrate my server:
public static void main(String[] args) throws Exception {
Server server = new Server(8080);
Context context = new Context(server,"/",Context.SESSIONS);
context.addServlet(new ServletHolder(new WebGenerator()), "/");
server.start();
server.join();
}