Skip to main content

Linux: Java Servlet Example


Explains how to run the Java Servlet example that comes with the Java Engine, in a Linux OS.


After completing this tutorial you will have a Tomcat 6 server running a servlet created using the Windward Java Engine.


Before starting, you will need to have the Java Engine available on your Linux system.  If it isn't already, we have a tutorial for that.  If it is, make note of the directory in which you unpacked the zip file.  In the previously mentioned tutorial, and in this tutorial, we use /opt/windward.



Install Tomcat

The first thing to do is install the tomcat 6 server.  In Ubuntu 12.04, the command to do this is as follows:

sudo apt-get install tomcat6

In other distributions and flavors, this might be different, however if you are familiar with your package manager this won't be difficult.

Set Up Servlet

After that, copying a few files will have set everything up:

sudo cp -rT /opt/windward/demo/Samples/Java/Servlet/ /var/lib/tomcat6/webapps/JavaServletExample
sudo cp ~/ /var/lib/tomcat6/webapps/JavaServletExample/WEB_INF/

And while this isn't required, it is a good idea to go ahead and restart the Tomcat service:

sudo /etc/init.d/tomcat6 restart

What's Next

You now have a working server running Windward Java Engine servlets.  The next step would be to deploy your own servlet applications which can be made by modifying the samples included with the engine, or starting from scratch using the Java Engine API.

  • Was this article helpful?