I think that probably /var/lib/tomcat5 is your CATALINA_BASE.  Tomcat
may do a variety of strange things if you make changes in there,
particularly in $CATALINA_BASE/webapps, where Tomcat unpacks .war
archives.  Tomcat makes a number of assumptions about who controls
files in its directories, some contrary to my expectations.

I've learned through frustrating experience to stay far away from any
directory that Tomcat wants to write.  What I do nowadays is to put my
webapp.s completely outside of any directory that belongs to Tomcat,
and then drop a Context descriptor file into
"$CATALINA_BASE/conf/Catalina/localhost".  The Context then points to
the webapp using the docBase attribute.  Like so:

  savage ~ # cat /etc/tomcat-6/Catalina/scholarworks.iupui.edu/ROOT.xml
  <?xml version="1.0" encoding="UTF-8"?>
  <Context docBase="/opt/iupuischolarworks/webapps/xmlui">
    <Parameter
       name="dspace.configuration"
       value="/opt/iupuischolarworks/config/dspace.cfg"
       description="Path to the DSpace configuration file."
       />
  </Context>

(On Gentoo Linux, $CATALINA_BASE/conf is a symbolic link to
"/etc/tomcat-VERSION".  Your environment may be different.)

The basename of the Context file, less ".xml", becomes the Context
path, with the exception that ROOT.xml will describe the root context
"/" (which is where you wanted to put the DSpace UI).  So for example
the host from which I took the Context above also has an "oai.xml":

  savage ~ # cat /etc/tomcat-6/Catalina/scholarworks.iupui.edu/oai.xml 
  <?xml version="1.0" encoding="UTF-8"?>
  <Context docBase="/opt/iupuischolarworks/webapps/oai">
    <Parameter
       name="dspace.configuration"
       value="/opt/iupuischolarworks/config/dspace.cfg"
       description="Path to the DSpace configuration file."
       />
  </Context>

which causes the OAI-PMH responder to be exposed at "/oai".

This works well with the way that DSpace 1.5 installs itself, since
the webapp.s will be copied to [DSpace] along with the rest and you
can simply point to them there from the Context.

I usually keep a copy of each Context as appName.xml.saved, edit the
.xml.saved version, and then copy to the .xml version.  That is a
habit I developed early on, when Tomcat would sometimes delete my
Context files when redeploying, apparently on the assumption that it
had written them.  I don't believe it is doing that, now that I've
moved the webapp.s out of Tomcat's directories, but I keep the habit.

-- 
Mark H. Wood, Lead System Programmer   [email protected]
Friends don't let friends publish revisable-form documents.

Attachment: pgp7NmAD1bXfY.pgp
Description: PGP signature

------------------------------------------------------------------------------
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to