2

I have an war file with runs under tomcat i need to make it as an desktop application and most of them recommend to embedded an jetty server as an desktop application can any one explain how to do it with an example. I am little confused how to do it or some tutorials that embedded jetty server as desktop application.

Ramesh
  • 2,295
  • 5
  • 35
  • 64

2 Answers2

4

These are your options:

Łukasz Rżanek
  • 5,786
  • 27
  • 37
1

Embedding Jetty is really simple if you dare to try it. At first glance, web servers are mysterious beasts but they are really just "simple" Java applications which open a server socket and listen to HTTP requests. Just create an instance of Server and start() it.

That will create a couple of new threads in which Jetty will handle requests. Your main thread is free to whatever else it wants to do. To stop it, call stop() and join().

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820