Skip to content

Latest commit

 

History

History
58 lines (35 loc) · 1.74 KB

README.md

File metadata and controls

58 lines (35 loc) · 1.74 KB

Weld Numberguess Example

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.

Deploying to WildFly

Make sure you have assigned the absolute path of your installation to the JBOSS_HOME environment variable.

  1. Open terminal and start the server by running

     $JBOSS_HOME/bin/standalone.sh
    
  2. Build and deploy the example to the server you have started in step 1 using command

     mvn clean package wildfly:deploy
    
  3. Now you can view the application at http://localhost:8080/weld-numberguess.

To run the functional tests, execute:

mvn verify -Darquillian=wildfly-managed-8

Deploying to WildFly Web

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.

  1. Open terminal and start the server by running

     $JBOSS_HOME/bin/standalone.sh
    
  2. Build and deploy the example to the server you have started in step 1 using command

     mvn clean package -Pwildfly-web wildfly:deploy
    
  3. Now you can view the application at http://localhost:8080/weld-numberguess.

Deploying to standalone Tomcat 8

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.