Jakarta EE Programming/WildFly
Appearance
WildFly (formerly JBoss) is an open source application server developed by Red Hat. Here is the first steps to use it:
- Download it from the website. You will need a Red Hat account.
- Launch the JAR file with Java. If you're not familiar with an application server, try to keep the default options as much as possible. Note the location where JBoss will be installed.
JBoss should be installed. To verify so, we will create a minimalist application to run.
- Create a file called
index.html
with the following content:
<html> <body> Hello World! </body> </html>
- Open this file with a web browser. It should display "Hello World!".
- Close the browser.
- If you are on Windows or Mac, zip the file (i.e. create an archive).
- If you are on Linux or UNIX, create an archive, compressed or not, like a .tar file.
- Rename the archive file to
helloworld.war
(yes, rename also the file extension). - Put the WAR file in the
standalone\deployments
folder of JBoss (you should have noted where JBoss is installed). - Start JBoss. If you are on Windows, you should find the option to start JBoss in the Windows start menu. Otherwise, you can start JBoss by launching the script
standalone.bat
(on Windows) orstandalone.sh
(on Mac, Linux or UNIX) in thebin
folder of JBoss. In thedeployments
folder, you should see the deployed version of your application:helloworld.war.deployed
. - On a browser, go on
http://localhost:8080/helloworld/
. You should see "Hello World!".