This example demonstrates the use of Weld in a Servlet container (Tomcat or Jetty) or as a non-EJB application for a Java EE server (WildFly or GlassFish). No alterations are expected to be made to the container. All services are self-contained within the deployment.
Make sure you have assigned the absolute path of your installation to the
JBOSS_HOME
environment variable.
-
Open terminal and start the server by running
$JBOSS_HOME/bin/standalone.sh
-
Build and deploy the example to the server you have started in step 1 using command
mvn clean package wildfly:deploy
-
Now you can view the application at http://localhost:8080/weld-numberguess.
To run the functional tests, execute:
mvn verify -Darquillian=wildfly-managed-8
WildFly Web is a lightweigh Servlet-only version of WildFly.
Make sure you have assigned the absolute path of your installation to the
JBOSS_HOME
environment variable.
-
Open terminal and start the server by running
$JBOSS_HOME/bin/standalone.sh
-
Build and deploy the example to the server you have started in step 1 using command
mvn clean package -Pwildfly-web wildfly:deploy
-
Now you can view the application at http://localhost:8080/weld-numberguess.
If you want to run the application on a standalone Tomcat, first download and extract Tomcat. This build assumes you will be running Tomcat in its default configuration, with a hostname of localhost and port 8080. Build example using command
mvn clean package -Ptomcat
and deploy created WAR to Tomcat.