|
Description
Michael Vorburger
Created attachment 183083 [details]
How I've worked around the current (by design) "limitation" (one class, full working example on github)
Created attachment 183084 [details]
WebContextConfiguration showing how I've worked around the current (by design) "limitation" (one class, full working example on github)
Created attachment 183085 [details]
MetaInfConfiguration showing how I've worked around the current (by design) "limitation" (one class, full working example on github)
Created attachment 183086 [details]
FragmentConfiguration showing how I've worked around the current (by design) "limitation" (one class, full working example on github)
Michael, this is a great idea! We'll have a ponder and look at what you have done and comment more soon. Greg, thank you for the encouragement. Did you get a chance to "ponder" ;) yet? Can I help? FYI: I'm currently integrating this approach for an enhanced workspace experience into http://mifos.org In that context, I came across a... "funky problem" which is an impact of this solution that I initially hadn't considered, and that I wanted you to be aware of in case (hopefully) you'll integrate, something like, this: ServletContext.getResource() & getResourcePaths() has to be adapted for a now "virtualized" WEB-INF/lib. Have a look at https://github.com/vorburger/EclipseWebDevEnv/blob/servlet30-jetty7/simpleservers/ch.vorburger.modudemo.server/src/main/java/ch/vorburger/modudemo/server/WebContextWithServletContextResourceTrick.java (I'll also attach it) and I'm sure you guys will immediately understand. Created attachment 186049 [details]
WebContextWithServletContextResourceExtension.java
thank you, this helped me a lot :) I am using this to be able to start my modular webapp during development in eclipse and when the deployment is being done into a fat-jar which has jetty embedded and every class in the same jar packaged FTR: This approach is meanwhile heavily & successfully used in the workspace of the Mifos.org development community. In case the links above ever go 404, following http://mifosforge.jira.com/wiki/display/MIFOS/Workspace+2.0 (or simply digging into the code at mifos.git.sourceforge.net) may be helpful. Any idea when this might get implemented? At my company, we have been developing web apps (normally war) for many years. We spend lots of extra time making sure that our apps work in JBoss, WebLogic, and Websphere because our customers will expect to be able to deploy into their favorite app server. Not to mention that customers will always find a way to misconfigure the server or deploy other wars into the same server instance. The headaches never seem to end..... I am piloting a program to use Jetty in embedded mode. We will basically have a command line application which will start up Jetty to function as a servlet container. So far, everything looks very promising except that developers are impacted since they can't run the app inside of their ide(s). In the mean time, it looks like I should be able to use these configuration classes provided by Michael (thanks by the way!!!). Wow, this issue has been open for a long time. Sorry! However, the good news is that I believe that these workarounds are no longer necessary with jetty-9 (in particular jetty-9.2 and above). The code now handles either jars or directories on both the container path and the webapp path (via use of the WebAppContext.setExtraClassPath() method, see https://www.eclipse.org/jetty/documentation/current/jetty-classloading.html#using-extra-classpath-method). I'm going to close this issue as a works-for-me for jetty-9. cheers Jan |