<commit_before>== Deploying Applications to WildFly

*Purpose*: This section explains different ways to deploy Java EE 7 applications to WildFly.

Make sure to start a WildFly standalone instance for each sub-section unless stated otherwise. A standalone instance can be started as:

[source]
----
standalone.sh
----

=== File system

Deploying archives such as war, ear, and rar files using file system is as simple as copying to `standalone/deployments` directory. The deployment can be configured for auto-deploy or manual mode.

*Purpose*: This section explains how to deploy a Java EE 7 application to WildFly using filesystem commands.

Any archive can be placed in `standalone/deployments` directory and is automatically deployed to the server. This is the default behavior.

CAUTION: This deployment mode is only intended to be used during development phase. Managed domain mode is recommended if running production systems.

. Download a Java EE 7 sample application from ADD LINK.
+
. Copy the war file to `standalone/deployments` directory using the following command:
+
[source]
----
cp target/javaee7-1.0-SNAPSHOT.war /Users/arungupta/workspaces/wildfly/build/target/wildfly-8.0.0.Final-SNAPSHOT/standalone/deployments
----
+
. Verify the deployed application by accessing the webpage http://localhost:8080/javaee7-1.0-SNAPSHOT/EmployeeList and see the output as:
+
image::images/deploy-javaee7-sample-output.png[Java EE 7 Sample Application Output]

=== Administration Console

The Admin Console is a web-based administration console and available at http://localhost:9990/console.

*Purpose*: This section explains how to deploy a Java EE 7 application to WildFly using web-based Administration Console.

. A new user in the management realm needs to be added before the admin console can be accessed.
+
A new user can be added in the management realm using `add-user.sh` script. This can be done non-interactively by giving the following command:
+
[source]
----
add-user.sh -u sheldon -p bazinga
----
+
The output of the command looks like:
+
[source]
----<commit_msg>fixing issue #1<commit_after>== Deploying Applications to WildFly

*Purpose*: This section explains different ways to deploy Java EE 7 applications to WildFly.

Make sure to start a WildFly standalone instance for each sub-section unless stated otherwise. A standalone instance can be started as:

[source]
----
standalone.sh
----

=== File system

Deploying archives such as war, ear, and rar files using file system is as simple as copying to `standalone/deployments` directory. The deployment can be configured for auto-deploy or manual mode.

*Purpose*: This section explains how to deploy a Java EE 7 application to WildFly using filesystem commands.

Any archive can be placed in `standalone/deployments` directory and is automatically deployed to the server. This is the default behavior.

CAUTION: This deployment mode is only intended to be used during development phase. Managed domain mode is recommended if running production systems.

. Download a Java EE 7 sample application from https://github.com/arun-gupta/wildfly-lab/blob/master/samples/javaee7/javaee7-1.0-SNAPSHOT.war?raw=true.
+
. Copy the war file to `standalone/deployments` directory using the following command:
+
[source]
----
cp target/javaee7-1.0-SNAPSHOT.war /Users/arungupta/workspaces/wildfly/build/target/wildfly-8.0.0.Final-SNAPSHOT/standalone/deployments
----
+
. Verify the deployed application by accessing the webpage http://localhost:8080/javaee7-1.0-SNAPSHOT/EmployeeList and see the output as:
+
image::images/deploy-javaee7-sample-output.png[Java EE 7 Sample Application Output]

=== Administration Console

The Admin Console is a web-based administration console and available at http://localhost:9990/console.

*Purpose*: This section explains how to deploy a Java EE 7 application to WildFly using web-based Administration Console.

. A new user in the management realm needs to be added before the admin console can be accessed.
+
A new user can be added in the management realm using `add-user.sh` script. This can be done non-interactively by giving the following command:
+
[source]
----
add-user.sh -u sheldon -p bazinga
----
+
The output of the command looks like:
+
[source]
----
{'fraction_non_alphanumeric': 0.07733770799156316, 'fraction_numerical': 0.01195219123505976, 'mean_word_length': 4.308457711442786, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '890579', 'n_tokens_mistral': 1223, 'n_tokens_neox': 1141, 'n_words': 531}