The servlet container is required to run Java Servlet and compiling JSP on the runtime at the server side. Most of the web servers such as Apache contain a servlet container by itself that allow Java Servlet and JSP to be run. In this case, there is no need to download any extra program. The required things to do is to set the AntigoneUI application to a proper URI on the web and place the application at the appropriate base directory. Since this part is different from servers to servers, please consult the web servers instruction guides on setting up web application.
In the other case, for instance, there is no web server installed in the machine or the web server do not implement the Servlet 2.3 and JavaServer Pages 1.2 specifications. Then a web servlet container can be downloaded. The following instruction is an example of downloading and configuring Tomcat, a free web servlet container developed by Apache organization, to run AntigoneUI and configure so that it support SSL connection also.
First of all, you need to download Apache Tomcat. It can be downloaded from this site. After setup Tomcat Apache at the server side, we need to do two things, as following:
1, Configure the server to recognize AntigoneUI application.
2. Configure the server to accept SSL connection.
Let the path where you store Tomcat be Tomcat. OpenTomcat/conf/server.xml . Add the following XML tag inside the host tag:
<Context path="..." docBase="..." reloadable="true">
<Realm className="org.apache.catalina.realm.JDBCRealm"
connectionName="..."
connectionPassword="..."
connectionURL="jdbc:mysql://localhost/AntigoneUI"
driverName="..."
userTable="user_passwd"
userRoleTable="user_role"
userNameCol="userid"
userCredCol="password"
roleNameCol="role"
digest="MD5"
debug="99"
/>
</Context>
The first attribute, path, indicate what URL the web application will be referenced to. It must be start with a "/". For instance, if path is "/AntigoneUI" and your domain name is www.domainname.com. Then the URL to the web application is http://www.domainname.com/AntigoneUI .
The second attribute, docBase, is the location where the application is stored in the server side. It can be relative or absolute path. If you choose to use relative path, path without "/", then the location is relative to Tomcat/conf/ .
The third attribute, connectionName, is the login name to the database server.
The forth attribute, connectionPassword, is the login password to the database server.
The fifth attribute, connectionURL, is the database URL. Usually it starts with "jdbc:....".
The sixth attribute, driverName, is the database driver name used to connect to the database. It must support JDBC.
There is already a tag configure to use SSL connection. But that tag is commented out. It is a <configure> tag with the comment above: <!-- Define an SSL HTTP/1.1 Connector on port 8443 --> . Uncomment this tag out. It is similar to the following:
<!-- Define an SSL HTTP/1.1 Connector on port 8443 -->
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="443" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="10" debug="0" scheme="https" secure="true">
<Factory className="org.apache.catalina.net.SSLServerSocketFactory"
clientAuth="false" protocol="TLS"
keystoreFile="..."
keystorePass="..."
/>
</Connector>
The default port number is 8443. The real https port number is 443. AntigoneUI application only use the https with port on port number 443. You need to add two attributes in the <Factory> tag. One attribute is keystoreFile. This attribute store where the server key is stored. It can be a relative or absolute path.
The second attribute is keystorePass. It is the password to the key.
Usually, you can get a server key from some authority like Verisign. But in case you want to use AntigoneUI without a key signed by an authority, you can still generate a key for your server. By using JDK1.4 or above, it contains a utility called keytool, which can be used to create a key.