Servletcontexthandler which jar




















I really don't want to go through the hassle of building and working with a war if I don't have to. I've read the following links, but haven't found a way to set the ResourceBase or BaseResource property when running from a jar.

Start java application with jetty without WAR file. Embedded Jetty looking for files inside its Jar file. And if I do that, then do I have to package as a war? Note: you set this at the ServletContext level, not the DefaultServlet level, that way all servlets in your context have access to the same information and the various methods in ServletContext related to real file paths and resources are sane.

Login using GitHub Register. Ask a Question. Please log in or register to add a comment. Asked 12 years, 1 month ago. Active 9 years, 5 months ago. Viewed 20k times. Does anyone know if that's possible? LaSombra LaSombra 1 1 gold badge 7 7 silver badges 12 12 bronze badges. Add a comment. Active Oldest Votes. Uriah Carpenter Uriah Carpenter 6, 30 30 silver badges 28 28 bronze badges.

Server or org. The link above is out of date, and it seems with Jetty version 9. It's pretty simple, if you throw Spring into the equation. And here it goes All Jetty libraries are inside the. You are mostly interested in the startServer method as that is where the jetty server of the test case is being configured for ssl.

I linked you the jetty-8 version of the test since you are using SelectChannelConnector you are using either 7 or 8. Jetty 9 has a bit different configuration of the server connectors. We'll have to add in an embedded example for this ssl configuration and document that in our jetty 9 documentation sometime.

I'll link that here so folks can see it when we add that example. ServletContextHandler; import org. ServletHolder; import org. The code can be found here. Its best if you use the JSP libs that comes with the jetty distribution. Here's an example, using jetty-distribution AbstractMethodError: javax.

Only authorized users can answer the question. Please sign in first, or register a free account. Not the answer you're looking for?



0コメント

  • 1000 / 1000