> From: AdamSives [mailto:a.si...@unsw.edu.au]
> Subject: Tomcat installation for Flyswatter

> I'm getting stuck with the Tomcat part...

Care to tell us what version of Tomcat you're using?  While you're at it, tell 
us what JRE/JDK you're using, and what platform you're running on.

Before attempting to configure Tomcat to run Flyswatter, install and run Tomcat 
without any changes to verify its basic operation and to get an idea of what 
you've gotten yourself into.

> the instructions say --"Add the following line to the
> configuration file within the <Service> node:"

Make sure you remove the existing <Realm> declaration when you insert the new 
one.

> <Realm className="org.apache.catalina.realm.JDBCRealm"
> connectionURL="jdbc:mysql://localhost/security?useUnicode=yes&
> amp;characterSet=utf8"
> connectionname="database_user" connectionpassword="database_password"
> debug="0" digest="MD5" driverName="com.mysql.jdbc.Driver"
> roleNameCol="usrole" userCredCol="uspasswd" userNameCol="usname"
> userRoleTable="roles" userTable="users"/>

The above presumes that you will have a MySQL database running on the same 
system as Tomcat to keep track of user credentials for authentication & 
authorization.

> --Add the following line to the configuration file within the
> <Host> node:
> <Context docBase="ParticleBoard" path="" reloadable="true"
> source="org.eclipse.jst.j2ee.server:particleboard"/>

Assuming you're on reasonably recent version of Tomcat, the above is in error: 
<Context> elements should not be placed in server.xml, but rather in the 
webapp's META-INF/context.xml file, or in 
conf/Catalina/localhost/[appName].xml.  Other mistakes in the above include 
specifying conflicting path and docBase names (an empty path indicates this is 
the default webapp for the <Host>, but in that case the webapp shold be stored 
in a directory named ROOT); also, there is no source attribute for a <Context> 
element.

> ..and I'm not sure which part of the .xml it is referring to.

The above references server.xml in Tomcat's conf directory.

> ALSO, the section of the documentation headed "WEB.XML
> CONFIGURATION" is over my head.

The contents of WEB-INF/web.xml are specified by the servlet spec, which can be 
obtained here:
http://jcp.org/aboutJava/communityprocess/mrel/jsr154/index2.html

> It's bleedingly obvious that I don't even know
> where to start with this.

First, look at the docs appropriate to your version of Tomcat at 
tomcat.apache.org; use this information in conjunction with the examples that 
come with Tomcat in its webapps directory.  Also look at the server.xml and 
web.xml files in Tomcat's conf directory.  (Note that conf/web.xml is shared by 
all webapps, so don't make any webapp-specific changes there.)

The easiest way to install a webapp as the default one is to change its 
directory name to ROOT (case sensitive, even on Windows) under Tomcat's webapps 
directory; remove any existing ROOT directory (or ROOT.war file) first, of 
course.

If you want to keep the directory name for your webapp as ParticleBoard, then 
do not put it under Tomcat's webapps directory, but do remove the existing ROOT 
directory there.  Put your webapp somewhere outside of Tomcat's directory 
structure, and create the file conf/Catalina/localhost/ROOT.xml containing the 
following:

<Context docBase="[/absolute/path/to/ParticleBoard]" reloadable="true"/>

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to