A little tongue in cheek here . . . . .

Repeat after me:

RPMs are evil, RPMs are evil . . .

I think a much cleaner way to install Tomcat is to get
the g'zipped tar file, copy it to the directory you
want, then uncompress and untar the distribution.

Once that happens, you can rename the directory, place
the directory under a special ownership, or perform
other system-related post installation tasks.

Once you have done that, then start Tomcat up with the
provided startup.sh scripts.  Make sure that it
operates properly (connect to 8080, examples work,
etc.) before attempting anything else.

Before commenting out the rest of the examples, I
would have a very small application set up that I can
use to test the installation.  What I've done is the
following:

1. Create a new directory under $CATALINA_HOME/webapps
and call it beg-jsp (or whatever).

2. Place a very simple jsp file in the directory.  Yes
I know it's not a proper jsp/servlet application, but
the simpler the better.  Here's one that I use.

<%@ page language="java" contentType="text/html" %>
<html>
  <head>
    <title>My First JSP</title>
    <% java.util.Date date = new java.util.Date(); %>
  </head>
<body>
  Hello World!<br>
  the current date and time is <%= date %>
</body>
</html>

3. Add the following in server.xml right before the
</Host>

<Context  
className="org.apache.catalina.core.StandardContext"
crossContext="true" reloadable="true"
mapperClass="org.apache.catalina.core.StandardContextMapper"
useNaming="true" debug="0" swallowOutput="false"
privileged="false"
wrapperClass="org.apache.catalina.core.StandardWrapper"
docBase="beg-jsp" cookies="true" path="/beg-jsp"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper">
<Logger
className="org.apache.catalina.logger.FileLogger"
debug="0" verbosity="1"
prefix="localhost_beg-jsp_log."
directory="logs" timestamp="true" suffix=".txt"/>
</Context>

4. Restart Tomcat and browse to /beg-jsp/datetime.jsp
(or whatever you named the file).

5. Once you've seen the result with the current date
and time, you can start removing the sample
applications from server.xml.

6. Once Tomcat starts up without the contexts in
server.xml, you can then delete (I recommend move) the
sample applications.

Now you should have a Tomcat with a very minimal test
that you can use to test startup scripts in
/etc/rc.d/rc3.d (or where ever SuSE puts the scripts).

/mde/

just my two cents . . . .

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to