0

I don't understand, how is it possible to deploy ActiveWeb web application? It is said it has no config files. Hence it has no web.xml. So, how would container know, what class to run?

For example, I tried to run sample "Hello Bob" application under Jetty under Eclipse -- and it was predictable not run. I.e. jetty gives 404 error on http://localhost:8080/greeting

What is the secret? I think it should be something like default servlet configured, which is not described in quickstarts...

May be some maven goal should be ran or something?

Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385

2 Answers2

1

With Servlet 3.0+ there is technically no need for a web.xml

Everything can either be discovered via servlet annotations, or programmatically added to the container via custom ServletContainerInitializers or custom ServletContextListener.

Now with ActiveWeb, there is a web.xml present in their documentation, so I would say if your project can build a webapp war file, then you are capable of deploying it in Jetty.

Now, if you don't see what you are expecting, (IE, the 404 response), then that's likely a concern in how your webapp is packaged.

Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136
  • It is not packaged. It is a `maven-archetype-webapp` project. Then I used `Jetty Eclipse` plugin, to do `Run with Jetty`. It is somehow runs Jetty in unknown location. If everything done with annotations, then maybe it doesn't take class files into webapp... – Suzan Cioc Sep 10 '14 at 21:53
0

Deployment of ActiveWeb applications is not any different from deployment of any Java web apps.

While Joakim correctly states, that web.xml is not necessary, we do use web.xml with ActiveWeb, please see: https://github.com/javalite/activeweb-bootstrap/blob/master/src/main/webapp/WEB-INF/web.xml

Use:

mvn clean package

and then find a war file under target.

Use this guide to get started: http://javalite.io/getting_started_activeweb

Also, this might be a duplicate of: ActiveWeb web application does not run under Jetty

tx

Community
  • 1
  • 1
ipolevoy
  • 5,432
  • 2
  • 31
  • 46