Thanks Joakim,
your explanation is very clear.
I followed your hint 6.3. Howewer seems that also in this case websocket
are not active!!! I followed example from tutotial on Jetty 9 documentation
page.
This is my code:
String jetty_home = System.getProperty("jetty.home", ".");
System.setProperty("jetty.home", jetty_home);
Server server = new Server();
HttpConfiguration http_config = new HttpConfiguration();
http_config.setSecureScheme("https");
http_config.setSecurePort(443);
http_config.setOutputBufferSize(32768);
ServerConnector http = new ServerConnector(server, new
HttpConnectionFactory(http_config));
http.setPort(8083);
http.setIdleTimeout(30000);
// Set the connectors
server.setConnectors(new Connector[] { http});
WebAppContext webapp = new WebAppContext();
webapp.setContextPath("/gateway");
webapp.setWar("C:\\gateway.war");
server.setHandler(webapp);
// Start the server
server.start();
server.join();
Do you see something that prevent from loading Websocket?? As yet say,
using jatty-maven-plugin my app works fine with websockets!
Thanks for your help!
2014-10-15 21:26 GMT+02:00 Joakim Erdfelt <[email protected]>:
> Sorry, I have no direct answers.
> I stopped using jetty-runner in the early Jetty 7 days (late 2008-ish)
> Barely used it then.
>
> Seeing as I had a hand in getting the JSR-356 support into Jetty, I
> decided to look into jetty-runner ...
> Yeah, it has no integrated JSR-356 support built-in.
> Jetty runner just simply doesn't have everything built-in, as that would
> be ridiculous and often contradictory/conflicting.
>
> Your options at this point:
>
> 1. Manage a classpath, add the missing jars
> - javax-websocket-client-impl-{version}.jar,
> javax-websocket-server-impl-{version}.jar,
> and javax.websocket-api-1.0.jar.
> 2. Build your own jetty-runner with those integrated
> 3. Use jetty-maven-plugin to launch jetty with your webapp maven build
> (testing only! not for production)
> 4. Use gradle's jetty plugins to launch jetty with your webapp's
> gradle build (testing only! not for production)
> 5. Use the jetty-distribution and the start.jar, along with the
> {jetty.home} vs {jetty.base} separation
> 1. Your project directory becomes a {jetty.base}, your {jetty.home}
> is a different directory with your as-is (unmodified)
> jetty-distribution.
> At bare minimum it will mean a single start.ini file in your project
> directory.
> 6. Build your project to utilize embedded-jetty techniques
> 1. You can make it an uberjar with everything included (jetty +
> your webapp)
> 2. You can make your war file self-executable, capable of launching
> an embedded jetty itself (included in your war)
> 3. You can make an embedded-jetty launcher of your own design (as
> an uber-jar) to deploy and number of webapps you want.
>
>
>
>
>
>
> --
> Joakim Erdfelt <[email protected]>
> webtide.com <http://www.webtide.com/> - intalio.com/jetty
> Expert advice, services and support from from the Jetty & CometD experts
> eclipse.org/jetty - cometd.org
>
> On Wed, Oct 15, 2014 at 12:04 PM, Daniele Renda <[email protected]>
> wrote:
>
>> Thanks for the clarification Joakim.
>>
>> I'd like to have a single jar in order to start jetty; for this reason I
>> used jetty-runner. Which is your suggestion in my case?
>>
>> Thanks very much
>>
>> 2014-10-15 19:33 GMT+02:00 Joakim Erdfelt <[email protected]>:
>>
>>> Anu,
>>>
>>> Daniele is using Jetty Runner, which is different than the Jetty
>>> Distribution's start.jar mechanism.
>>>
>>> Frankly, the start.jar mechanism is loads easier than the
>>> jetty-runner.jar process with Jetty 9.
>>> It used to be the reverse in older versions of Jetty, jetty-runner was
>>> simpler, but that's no longer true.
>>>
>>>
>>>
>>> --
>>> Joakim Erdfelt <[email protected]>
>>> webtide.com <http://www.webtide.com/> - intalio.com/jetty
>>> Expert advice, services and support from from the Jetty & CometD experts
>>> eclipse.org/jetty - cometd.org
>>>
>>> On Wed, Oct 15, 2014 at 10:21 AM, Padki, Anuradha <
>>> [email protected]> wrote:
>>>
>>>> Yes I too run 9.2
>>>>
>>>> Did you have all .ini set up already? Which directory are you running
>>>> it from?
>>>>
>>>> Did you run this in the folder from where you will start the app.
>>>>
>>>> java -jar $JETTY_HOME/start.jar
>>>> --add-to-startd=http,deploy,websocket,jsp
>>>>
>>>>
>>>>
>>>> - Anu
>>>>
>>>>
>>>>
>>>> *From:* [email protected] [mailto:
>>>> [email protected]] *On Behalf Of *Daniele Renda
>>>> *Sent:* Wednesday, October 15, 2014 11:33 AM
>>>> *To:* JETTY user mailing list
>>>> *Subject:* Re: [jetty-users] Enable JSR356 with jetty-runner
>>>>
>>>>
>>>>
>>>> Thanks Anu,
>>>>
>>>> I forgot to say that I'm using Jetty 9.2.3.v20140905.
>>>>
>>>> I continue to have the same problem.
>>>>
>>>> Thanks very much
>>>>
>>>>
>>>>
>>>> 2014-10-15 17:24 GMT+02:00 Padki, Anuradha <[email protected]>:
>>>>
>>>> I run jsr356 app it with start.jar and it runs fine.
>>>>
>>>> - Anu
>>>>
>>>>
>>>>
>>>> *From:* [email protected] [mailto:
>>>> [email protected]] *On Behalf Of *Daniele Renda
>>>> *Sent:* Tuesday, October 14, 2014 7:00 AM
>>>> *To:* [email protected]
>>>> *Subject:* [jetty-users] Enable JSR356 with jetty-runner
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I developed a Java server application (spring+hibernate) that use
>>>> websockets. When I run the app with jetty-maven-plugin all works fine, but
>>>> if I try to run my application with jetty-runner, then seems that JSR356
>>>> are not enabled.
>>>>
>>>> To load my app I run: java -jar c:\jetty.jar --port 8083 --path gateway
>>>> gateway
>>>>
>>>> Is supposed JSR356 included into jetty-runner? In the opposite case how
>>>> I can enable it?
>>>>
>>>> Thanks very much
>>>>
>>>>
>>>> --
>>>> Daniele Renda
>>>>
>>>>
>>>> _______________________________________________
>>>> jetty-users mailing list
>>>> [email protected]
>>>> To change your delivery options, retrieve your password, or unsubscribe
>>>> from this list, visit
>>>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>>> <https://urldefense.proofpoint.com/v1/url?u=https://dev.eclipse.org/mailman/listinfo/jetty-users&k=wdHsQuqY0Mqq1fNjZGIYnA%3D%3D%0A&r=4KNgn7IIPPl%2FiXDqTbxNPRf1lg2QQE5WxGK6NVGDZ5E%3D%0A&m=simJJ%2BYlHw2f4N8h9CcycamCaV2HIU5F9avWAqwp1p4%3D%0A&s=a957cdd424c56a72d73a9edc811b06ad933885925d182eba8519260184922bb0>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Daniele Renda
>>>>
>>>> _______________________________________________
>>>> jetty-users mailing list
>>>> [email protected]
>>>> To change your delivery options, retrieve your password, or unsubscribe
>>>> from this list, visit
>>>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>>>
>>>
>>>
>>> _______________________________________________
>>> jetty-users mailing list
>>> [email protected]
>>> To change your delivery options, retrieve your password, or unsubscribe
>>> from this list, visit
>>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>>
>>
>>
>>
>> --
>> Daniele Renda
>>
>> _______________________________________________
>> jetty-users mailing list
>> [email protected]
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>
>
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
--
Daniele Renda
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users