Running a standalone server

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Running a standalone server

Keith Brown
Currently, I am running a stanalone server by doing this:
java -Dorg.eclipse.jetty.util.log.DEBUG=true -cp
.:../jetty-all-9.4.7.v20170914-uber.jar HelloWorld

by following https://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorld

Is there a way I can simulate a start.ini with this setup? and
jetty.xml and webapp? How can I also setup request logs
(https://www.eclipse.org/jetty/documentation/9.4.x/configuring-jetty-request-logs.html)
with this setup?

I want something small and functionocal while not trying to fight
layers of directories and files.

Any thoughts would be much appreciated.
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Running a standalone server

Olivier Lamy
Hi Keith,
What you can do is to configure manually the request logger
        Server server = new Server(8080);
        server.setHandler(new HelloWorld());


        NCSARequestLog ncsaRequestLog = new NCSARequestLog();
        // Here the logger configuration
        server.setRequestLog( ncsaRequestLog );

        server.start();
        server.join();

That's the easiest way. 
To have a better logging system, I would recommend using a slf4j implementation (log4j2 or logback) with using the request logger class Slf4jRequestLog

HTH
Olivier


On Thu, Oct 26, 2017 at 1:53 PM, Keith Brown <[hidden email]> wrote:
Currently, I am running a stanalone server by doing this:
java -Dorg.eclipse.jetty.util.log.DEBUG=true -cp
.:../jetty-all-9.4.7.v20170914-uber.jar HelloWorld

by following https://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorld

Is there a way I can simulate a start.ini with this setup? and
jetty.xml and webapp? How can I also setup request logs
(https://www.eclipse.org/jetty/documentation/9.4.x/configuring-jetty-request-logs.html)
with this setup?

I want something small and functionocal while not trying to fight
layers of directories and files.

Any thoughts would be much appreciated.
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Olivier

_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Running a standalone server

Jan Bartel
In reply to this post by Keith Brown
Keith,

Here's a bunch of examples of how to configure jetty to do various things in an embedded scenario:  https://github.com/eclipse/jetty.project/tree/jetty-9.4.x/examples/embedded/src/main/java/org/eclipse/jetty/embedded

Jan

On 26 October 2017 at 13:53, Keith Brown <[hidden email]> wrote:
Currently, I am running a stanalone server by doing this:
java -Dorg.eclipse.jetty.util.log.DEBUG=true -cp
.:../jetty-all-9.4.7.v20170914-uber.jar HelloWorld

by following https://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorld

Is there a way I can simulate a start.ini with this setup? and
jetty.xml and webapp? How can I also setup request logs
(https://www.eclipse.org/jetty/documentation/9.4.x/configuring-jetty-request-logs.html)
with this setup?

I want something small and functionocal while not trying to fight
layers of directories and files.

Any thoughts would be much appreciated.
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users