Apologies for having asked such simple question, I have only some
experience with embedded Java...
I have added the
org.eclipse.jetty
jetty-slf4j-impl
${jetty.version}
to the pom.xml and now my WAR servlet finally works well with Jetty
> SLF4J: No SLF4J providers were found.
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#noProviders for further
details.
You don't have a provider in your classpath.
Add one.
You have many to choose from.
Jetty's own jetty-slf4j-impl,
Thank you, Joakim, now my servlet runs, but -
On Fri, Sep 3, 2021 at 6:32 PM Joakim Erdfelt wrote:
> You are using a JettyWebSocketCreator.
>
> Get rid of factory.register(WordsListener.class);
>
Jetty 10 prints:
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP)
You are using a JettyWebSocketCreator.
Get rid of factory.register(WordsListener.class);
Joakim Erdfelt / joa...@webtide.com
On Fri, Sep 3, 2021 at 11:09 AM Alexander Farber
wrote:
> Hi, thank you for the helpful hints, now my WAR compiles.
>
> However when I launch it by:
>
> 1) First
Hi, thank you for the helpful hints, now my WAR compiles.
However when I launch it by:
1) First running once on Win 10 / Java 11:
java -jar jetty-home-10.0.6\start.jar jetty.home=jetty-home-10.0.6
jetty.base=jetty.base
--add-module=http,servlet,webapp,deploy,resources,websocket
2) Then running
Alexander,
You should only need to change your line with `JSON.toString(root)` to `new
JSON().toJSON(root)`.
As for the deprecated header() method, it says in the javadoc to use the
`headers(Consumer)` method instead.
So would look something like this:
HttpClient httpClient = new HttpClient();
Hi Joakim and all -
On Tue, Aug 31, 2021 at 6:19 PM Joakim Erdfelt wrote:
> With that said, you appear to be using the Jetty implementation/apis.
> So, switch to `org.eclipse.jetty.websocket.server.JettyWebSocketServlet`
> instead.
>
> JSON json = new JSON();
> // configure json here
> Map
Jetty 10 still has the concept of a WebSocketServlet.
But it's no longer generic and functions for all implementations/apis.
With that said, you appear to be using the Jetty implementation/apis.
So, switch to `org.eclipse.jetty.websocket.server.JettyWebSocketServlet`
instead.
Found in