ListenUp, JSP Guide

Home for ListenUp with JSP

When this document refers to <tomcatdir>, it shall be understood to mean the installation directory of Tomcat.  For example <tomcatdir>/webapps on your server may expand to /home/tomcat/jakarta-tomcat-4.1.27/webapps

Installation Guide

We will make a Tomcat 'webapp' called listenup_jsp
It will be served at http://www.yourserver.com:TomcatPort/listenup_jsp  For example, http://www.javasonics.com:8080/listenup_jsp

1) Copy the "listenup_jsp" folder itself and all its contents from the ListenUp distribution to <tomcatdir>/webapps

2) Copy the "codebase" folder itself and all its contents from the ListenUp distribution to <tomcatdir>/webapps/listenup_jsp

3)  JSP  needs to handle the multipart form request sent from the ListenUp applet.  There are a number of Java solutions to handling multipart form requests.  We use the Commons FileUpload  package, available from Apache, The Jakarta Project, and show you how to install it here.

Obtaining the Commons FileUpload distribution
Copy commons-fileupload-1.0.jar from the Commons FileUpload distribution to<tomcatdir>/webapps/listenup/WEB-INF/lib

4) Give Server Scripts Write Permission

You will need to give the scripts permission to write the uploaded files to the <tomcatdir>/webapps/listenup_jsp/ folder. You may be able to do this using your FTP client. Or you may need to login to the server and set them by hand. One brute force way is to set global write permissions on Linux using:

cd <tomcatdir>/webapps/
chmod 777 listenup_jsp
If global write permission is too scary, then you may be able to just use group write permission. You will need to determine the group used by your JSP module. I did that by first setting global write permission. Finishing this installation. Uploading a few files. Then looking to see what group they belonged to. In my case it was the "tomcat" group. Then I went back and did:
chgrp tomcat listenup_jsp
chmod 775 listenup_jsp

5) Configuring Tomcat

The procedure for creating a webapp varies between various versions of Tomcat and Unix.  Please consult the appropriate Tomcat documentation. It may only require adding a Context element as shown below, or it may require more steps.

Look for a Context element in <tomcatdir>/conf/server.xml. Then place this Context element immediately before it.

<Context path="/listenup_jsp"
         docBase="listenup_jsp"
         crossContext="false"
         debug="0"
         reloadable="true" >
</Context>

6) Restart Tomcat

7) Test Installation

Visit http://www.yourserver.com:tomcatport/listenup_jsp (for example, http://www.javasonics.com:8080/listenup_jsp ) and proceed with tests

Home for ListenUp with JSP