You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by AdamSives <a....@unsw.edu.au> on 2009/02/12 00:39:25 UTC

Tomcat installation for Flyswatter

My company needs to have a good look at this as a way of tracking our project
issues and problems etc!

I'm trying to install flyswatter as a means of doing so, but I'm getting
stuck with the Tomcat part... the instructions say
--"Add the following line to the configuration file within the <Service>
node:"
<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"/>

--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"/>

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

ALSO, the section of the documentation headed "WEB.XML CONFIGURATION" is
over my head. It's bleedingly obvious that I don't even know where to start
with this. Can you maybe point me in the right direction so I can find out?
Is there some n00b-friendly forum that may help with the concepts here?

Any help you could give would be appreciated.

http://www.nabble.com/file/p21967012/FlySwatter_Installation.pdf
FlySwatter_Installation.pdf 

http://www.nabble.com/file/p21967012/server.xml server.xml 

-- 
View this message in context: http://www.nabble.com/Tomcat-installation-for-Flyswatter-tp21967012p21967012.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Tomcat installation for Flyswatter

Posted by André Warnier <aw...@ice-sa.com>.
Pieter Temmerman wrote:
>> 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"/>
> 
> Maybe stupid question, but why do you need to put the webapp out of the Tomcat folder, in order to make it the root app?
> 
Proably because if you leave it as .../webapps/ParticleBoard/.. , then 
it will be /both/ the "ParticleBoard" /and/ the ROOT application (with 
the context file above), which may create some confusion.
Is this the right explanation, experts ?




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


Re: [OT] Tomcat installation for Flyswatter

Posted by André Warnier <aw...@ice-sa.com>.
Caldarale, Charles R wrote:
[...]
> 
... (possibly brain fade due to exposure to Perl).
...
  although Tomcat is getting better at detected such illogical 
configurations
...
See, here is the difference :
Perl, in contrast to some Microsoft products (and now apparently also 
Tomcat), makes no assumptions that it is smarter than you are and has to 
correct your mistakes. It assumes that you know what you're doing and 
lets you damn yourself if that's what you want to do.
Some (granted, mostly in the Perl world) argue that it keeps the mind 
alert and the arteries young.





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


RE: Tomcat installation for Flyswatter

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Pieter Temmerman [mailto:ptemmerman.ext@sadiel.es]
> Subject: RE: Tomcat installation for Flyswatter
>
> Maybe stupid question, but why do you need to put the webapp
> out of the Tomcat folder, in order to make it the root app?

The key clause in the statement was "If you want to keep the directory name for your webapp as ParticleBoard"; some people insist on deploying webapps in a directory different from the URL path, for no discernible reason (possibly brain fade due to exposure to Perl).  Normally, one would place the default webapp in the webapps/ROOT directory (or webapps/ROOT.war) and be done with it.

As Andre pointed out, placing a webapp under the <Host> docBase with one name *and* having a conf/Catalina/[host]/[otherAppName].xml file will likely get you double deployment, although Tomcat is getting better at detected such illogical configurations.

 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat installation for Flyswatter

Posted by Pieter Temmerman <pt...@sadiel.es>.
> 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"/>

Maybe stupid question, but why do you need to put the webapp out of the Tomcat folder, in order to make it the root app?



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


RE: Tomcat installation for Flyswatter

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: AdamSives [mailto:a.sives@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org