Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Using HttpClient from Web Application

Thanks. I was actually able to get it working this way by reconfiguring server classes accordingly. 

This scenario is a bit confusing.  The websocket extensions don't require me to drop the jars in web-inf/lib.  I activated the module and it was ready to go.  I now understand that was only because "org.eclipse.jetty.websocket."  isn't hidden by default.  Wouldn't that make sense for org.eclipse.jetty.client as well ?

I get that I shouldn't be activating the "client" module to get jetty-client.jar on the classpath  since its really intended for a different purpose. Still curious if there is any real harm done?











On Wed, Jan 6, 2016 at 1:13 PM, Simone Bordet <sbordet@xxxxxxxxxxx> wrote:
Hi,

On Wed, Jan 6, 2016 at 6:43 PM, Ross Sargant <rsargant@xxxxxxxx> wrote:
> Hi,
>    I have Jetty launching a web application from which I'd like to use the
> Jetty HttpClient in some background jobs started by the web app.
>
> I have activated the "client" module in my start.ini. I have used
> --list-classpath to
> confirm the presence of jetty-client-9.2.14.v20151106.jar  in the classpath
> built by start.jar.

You should not do this. The client module is for use of other server
modules such as the proxy module, not for use within webapps.

You just need to put the jetty-client jar and its dependencies in your
webapp's WEB-INF/lib and it's done.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Ross Sargant
Software Engineer
p: 954-773-9144 
email: rsargant@xxxxxxxx

TVR Communications LLC
Unit #1 - 5115 Harvester Road,Burlington,Ontario,L7L 0A3

Back to the top