JSPSMARTUPLOAD : DOCUMENTATION
Setup Apache/Tomcat
Last modification: May 1st 2000
© 2000 Advantys. All rights reserved.

Directories structure

Apache :

Root : /usr/local/apache
Modules : /libexec (sous Unix), /modules (sous Windows)
Configuration : /conf

Tomcat :

Root : /usr/local/tomcat

Our example web site:

Static Pages (served by apache) : /usr/local/apache/jspsmartupload
Dynamic Pages dynamiques (served by Tomcat) : /usr/local/apache/jspsmartupload/jsp
Upload directory : /usr/local/apache/jspsmartupload/upload
Classes : /usr/local/apache/jspsmartupload/Web-inf


Required configuration

- Apache 1.3 installed on port 80

- Tomcat 3.0 installed on port 8080 for the web server and on port 8007 for the JSP.


Stage 1: Apache and Tomcat Configuration

1 - Apache Configuration:

Copy mod_jserv.so in the modules directory of Apache
Create a configuration file for Apache :

# Load the jserv module that serves as Tomcat's apache adapter.
LoadModule jserv_module libexec/mod_jserv.so

# Module configuration
<IfModule mod_jserv.c>

# Prevents Apache from starting Tomcat (feature not yet implemented in Apache)
ApJServManual on

# Secure communication is off (feature not yet implemented in Apache)
ApJServSecretKey DISABLED

# when virtual hosts are used, copy the mount points from the base server
ApJServMountCopy on

# Log level
ApJServLogLevel notice

# Default communication protocol is ajpv12
ApJServDefaultProtocol ajpv12

# Default location for the Tomcat connectors.
ApJServDefaultHost 123.123.123.145
ApJServDefaultPort 8007

# Context declaration for JspSmartUpload files
# /jspsmartupload : static files
Alias /jspsmartupload /usr/local/apache/jspsmartupload

# /jspsmartupload/jsp : Dynamic files
ApJServMount /jspsmartupload /usr/local/apache/jspsmartupload

</IfModule>


This file (tomcat-apache.conf) must be imported in Apache configuration. To do so, just add the following line at the end of the Apache configuration files (httpd.conf):

Include /usr/local/apache/conf/tomcat-apache.conf

2 - Tomcat Configuration:

Add in the server.xml file, a context to locate jsp pages:

<Context path="/jspsmartupload" docBase="/usr/local/apache/jspsmartupload" defaultSessionTimeOut="30" isWARExpanded="true" isWARValidated="false" isInvokerEnabled="true" isWorkDirPersistent="false"/>

Caution: the name of the virtual directory, must be the same than the name used in the Apache configuration file with the ApJServMount command.


Stage 2: jspSmartUpload Installation

/usr/local/apache/jspsmartupload Static Pages (html)
/usr/local/apache/jspsmartupload/upload Upload/Download
/usr/local/apache/jspsmartupload/jsp Dynamic Pages (jsp)
/usr/local/apache/jspsmartupload/WEB-INF/classes Component

1. Copy files from jspsmartupload/*.html in the directory
/usr/local/apache/jspsmartupload.

2. Copy files from jspsmartupload/jsp/*.jsp in the directory
/usr/local/apache/jspsmartupload/jsp.

3. Copy files from jspsmartupload/Web-inf/classes in the directory
/usr/local/apache/jspsmartupload/WEB-INF/classes.

4. In order to save uploaded files, create a virtual path upload mapped the physical path : /usr/local/apache/jspsmartupload/upload.


View examples

Type the following URL in your browser: :
http://your_web_server/jspsmartupload/default.htm


© 2000 Advantys. All rights reserved.