Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] [jetty-user] Embedded Jetty: 404 after webapp.stop(); webapp.start();

Hi Jan,

thanks for your time and patience.

If you have already started jetty (jetty.start()) then you shouldn't
go through and explicitly start all the webapps that you have added,
as that will happen automatically, so you may be getting the "STARTED"
message from trying to start the webapps twice.

I know. The point is, I don't want to start the webapp right away. Rather, In want to start and stop it several times. In a nutshell, what I want to achieve is the following (I am just a JVM researcher doing some benchmarking, not a web developer, so please give me some leeway if the solution sounds obvious to you ;-):

1. Start Jetty once

Inside the timing loop:

  2.1 Start the webapp
  2.2 Issue a couple of HTTP requests
  2.3 Stop the webapp

Outside the timing loop again:

3. Stop Jetty (and any other clean-up that may be required)

You should be fine to stop the webapps at any time.

Right. But restarting is the problem. A cannot get the webapp, once restarted, to listen on its context paths again.

I hope this makes it clear what I am trying to do and why.

Best wishes,

Andreas


Back to the top