Setup for Fast Track to JavaServer Faces 2 (JSF 2.2) : Using JSF 2 to Build JEE Web Apps
Required Software
- Required: Intel-compatible processor (with reasonably recent hardware).
- Memory: 8GB min recommended
- Disk Space: Free disk space for software installs (generally minimum 2GB)
- Operating System: Windows OS (Any modern version - e.g. Windows 10. - labs have not been tested on Windows 8 variants)
- Required: Zip utility. A good free one is 7-zip
- Required: Adobe Acrobat Reader
- Recommended: Internet access
Instructions
Install 7-zip
We’ve found that there are sometimes problems using the built in Windows archive/zip utility. This generally has to do with long path lengths that it can’t handle. Use 7-zip to extract the labs and any software zips which we’ve found very reliable.
- Can try direct download link for 64-bit install: https://www.7-zip.org/a/7z1900-x64.exe
- If that doesn’t work, go to home page https://www.7-zip.org
- Near the top of the page, find the download link for your bitness (probably 64 bit), and download the installer.
- Execute the installer, and take all the defaults.
- You can now extract zip files by right clicking on them, and selecting 7-Zip | Extract ...
Lab Files: Each student and instructor must have lab files installed (links to these files are generally sent separately via e-mail).
- Extract the lab files to a location conveniently accessible to the student (e.g. C:\ )
- Recommend using utility like 7-zip, not Windows built-in extractor.
- If using folder other than C:\, make sure to remember where it is.
Install Java Development Kit – JDK 1.8 Update 281
- Note that any relatively recent JDK1.8 version is fine.
- From http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html download the installer file for your OS
- Windows 64 bit: xxx-windows-x64.exe (Almost certainly this is the one you want. 32-bit Windows OS installs are now rare).
- Windows 32 bit: xxx-windows-i586.exe
- Run the installer and take all defaults.
- Create or modify environment variables as appropriate for your OS. This will add an environment variable JAVA_HOME, and modify your path to include the jdk bin folder
- JAVA_HOME:
- Right click My Computer and choose Properties > click the Advanced tab > click the Environment Variables button
- In the bottom half of the dialog, click New to add a new System variable
- Variable name: JAVA_HOME (this is case-sensitive)
- Variable value: C:\Program Files\Java\jdk1.8.0_281 (or adjust to the actual path where you installed the JDK and your JDK version – please double-check this path – probably best to copy and paste it)
- Click OK
- Path:
- Find this existing entry in the bottom half of the Environment Variables button, and click Edit
- Click in the Variable value field and move your cursor all the way to the left (pressing Home on your keyboard should do this quickly for you)
- Check whether the value below is already present, or add it at the beginning if necessary (make sure you get all of this, including the trailing semicolon, with no spaces):
- %JAVA_HOME%\bin;
Click OK repeatedly (likely in 3 different dialogs) until all the dialogs close.
- JAVA_HOME:
- Open a terminal prompt type the below, and press Enter
javac -version
You should get a message that tells you the version. If the command is not found, you did something wrong. - Close the terminal prompt. You’re done installing Java.
Install WildFly 10.1
- Download: From http://wildfly.org/downloads go to the 10.1.0.Final section
- Go to the zip file link for the “Java EE Full & Web Distribution”
- The filename will be wildfly-10.1.0.Final.zip
- Save the file where you can access it easily
- You can also try the direct link: https://download.jboss.org/wildfly/10.1.0.Final/wildfly-10.1.0.Final.zip
- Extract: Extract the zip file where students can access and run it easily.
- Windows OS: Common location is C:\
- Mac OS: Common location is user home directory.
- Create a JBOSS_HOME Environment variable that points to the WildFly install folder (according to your OS needs)
- Windows OS: Right click My Computer and choose Properties, Click the Advanced tab, Click the Environment Variables button
- *nix / Mac OS: Generally done in user’s shell config file (e.g. ~/.bashrc)
- That’s all that needs to be done to install WildFly.
Install Eclipse Oxygen
(Version 4.7.3a or similar)
- Download: Try the below direct link for the 64 bit Windows version first. It should take you to a page with a big Download button - use it.
https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/oxygen/3a/eclipse-jee-oxygen-3a-win32-x86_64.zip - If the above works, you’re done with the download, and can continue with the Extract below
- If the above does not work, continue with these download instructions
- Go to http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/oxygen3a, and download the installer file for your OS
NOTE: Look for the Download Links section in the page. Do NOT use the big Download button.
NOTE: Make sure the bitness (e.g. 64 bit) matches the bitness of your JDK. Mixing them will fail.
- Windows 64 bit: xxx-windows-x64.exe
- Windows 32 bit: xxx-win32-x86_64.zip
- Extract:
- Windows: Unzip the file - Can extract to C:\, or other location convenient to student (as long as they know it, and can access it)
- Windows: Unzip the file - Can extract to C:\, or other location convenient to student (as long as they know it, and can access it)
- Test
- Execute the program (double click on the eclipse.exe executable, or a shortcut for it)
- Accept the default workspace, and let it load
- Quit Eclipse
- That’s it. You’re done installing Eclipse
Install JBoss Tools Into Eclipse
- Start Eclipse:
- Launch according to your OS and install details - e.g. for Windows, execute C:\eclipse\eclipse.exe, and for Mac, execute from Applications folder.
- In the dialog that comes up, use whatever workspace location is convenient (the default or something else you choose)
- Within Eclipse, close the welcome screen (Click the X on its tab)
- Install JBoss Tools: These are additional Eclipse plugins needed to work with JBoss servers within Eclipse.
- Within Eclipse, go to the Eclipse Marketplace - Menu Item Help | Eclipse Marketplace
- Type JBoss Tools in the Eclipse Marketplace search box and execute the search (generally via a search icon or Go Button)
- In the results, look for the JBoss Tools n.n.n.Final selection (e.g. JBoss Tools 4.5.1.Final) and click its Install button (the n.n.n version will change based on your Eclipse version)
- In the dialog that opens, Unselect the top level selection (e.g. JBoss Tools 4.5.1.Final)
- Make sure the top level selection is expanded, and select the following items
- JBoss AS, WildFly and EAP Server Tools
- JBoss Runtime Detection Core
- JBoss JAX-RS Tools and JBoss JAX-WS Tools (if available)
- Click Confirm in the lower right of the dialog
- Accept any license agreements
- Click Finish
- During the install, click OK if asked to confirm installation of any unsigned content
- Click Restart when prompted
- Set up Server within Eclipse
- Within Eclipse, go to the Servers view (Menu item Window | Show View | Servers or if that’s not visible then Window | Show View | Other | Server | Servers)
- Right click within the Servers view, and select New | Server
- In the dialog that opens, expand the JBoss Community node (for WildFly servers) or the Red Hat JBoss Middleware Node (for JBoss EAP servers)
- Select your server (Note your exact server may not be present. Select the latest one that is not newer than your server - e.g. WildFly 8.x for WildFly 8.2 or JBoss Enterprise Application Platform 6.1+ for JBoss EAP 6.4)
- Click Next until you reach the dialog for the server install directory, and configure it to point to your server install
- Click Finish
- Start the server and test
- Right click on the server you just created in the Servers view, and select Start
- Look at the Console View and note the server logging - it should start without any exceptions, and include a log message that the server started near the last logging (If console view not visible - Window | Show View | Console)
- Browse to http://localhost:8080/ where you should see a simple home page -
- If the home page is NOT accessible then the server didn’t start properly. Most common cause of this is port conflicts. Check (according to your OS) if port 8080 is in use, and if it is, then stop the process using it. Make sure that you set things up so students will NOT run into this issue.
- Shut down server and Eclipse
- Within Eclipse, in Servers view, right click on your server and select Stop
- Once the server stops, then Quit Eclipse
- That’s it - you’re done!
Courses and Class Files
This setup page is used for the following course: