Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Adding a WEB-INF jar to a webapp programmatically

ccleve,

You can set the context attribute org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern with a regexp pattern of jars from the container's classpath to scan for annotations, look for web-fragments etc etc.

Here's an example of setting it:

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
 
    <Call name="setAttribute">
      <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
      <Arg>.*/.*javax.faces-[^/]*\.jar$|.*/.*jsp-api-[^/]*\.jar$|.*/.*jsp-[^/]*\.jar$|.*/.*taglibs[^/]*\.jar$</Arg>
    </Call>
 
</Configure>

Jan



On 13 April 2013 05:13, ccleve <ccleve.tech@xxxxxxxxx> wrote:
At development time our app doesn't have any jars in WEB-INF/lib, which means our webapps aren't scanning them for web-fragment.xml. The jars are on the main app's classpath.

Is there any way to tell a WebAppContext programmatically to scan a particular jar?

Ideally, I'd be able to set a context-param or an init-param in web.xml to specify the name or location of the jar.

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com – Developer advice, services and support
from the Jetty & CometD experts.

Back to the top