The problem
The embedded Jetty 9 http server requires the full JDK to run JSP, because it's a requirement for Jasper, the JSP compiler.
SmartFoxServer 2X comes with an embedded JRE 1.7.x which is missing some of the components of the JDK (which takes 150+MB alone)
The Solution
You can install your own JDK.
If you run MacOSX you should already have installed it. Otherwise you can download the JDK from the Oracle website (Windows) or use the software management tools in your Linux distribution to get it installer.You will need the JDK 7 or higher.
For example if you are running an Ubuntu Linux box you will be able to install the JDK with a few commands in your terminal:
Code: Select all
sudo apt-get update
sudo apt-get install openjdk-7-jdk
Edit a couple of files and you're good to go
1) Take note of the JDK version. Let' say it is 1.7.0_65
- Go to the SFS2X/lib/jetty/modules/npn/
- See if a file called npn-1.7.0_65 exists (or whatever your JDK version is)
- If it doesn't duplicate an existing one an rename it to npn-1.7.0_65 (or whatever your JDK version is)
2) Move back to the SFS2X/ folder
- Edit the sfs2x-service file
- Uncomment the #INSTALL4J_JAVA_HOME_OVERRIDE line by removing the # (hash) sign
- Set it to the path of your installed JDK. In the case of our test machine (Ubuntu 14) it is
Code: Select all
INSTALL4J_JAVA_HOME_OVERRIDE="/usr/lib/jvm/java-7-openjdk-amd64/"
- Save and close
Start and Test
- Start the server
- Point your browser to http://localhost:8080/HelloServlet/
You should see the demo page loading and displaying correctly.