tomcat context fragment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

tomcat context fragment

Park, Michael
Hello All,

 

I've been working with solr on Tomcat 5.5/Windows and had success
setting my solr home using the context fragment.  However, I cannot get
it to work on Tomcat 5.028/Unix.  I've read and re-read the Apache
Tomcat documentation and cannot find a solution.  Has anyone run into
this issue?  Is there some Tomcat setting that is preventing this from
working?

 

Thanks,

Mike

Reply | Threaded
Open this post in threaded view
|

RE: tomcat context fragment

Park, Michael
I've found the problem.

The Context attribute path needed to be set:

<Context path="/solr" docBase="/users/mp15/solr.war" debug="0"
 crossContext="true">
   <Environment name="solr/home" type="java.lang.String"
    value="/Users/mp15/solr" override="true"/>
</Context>


-----Original Message-----
From: Park, Michael [mailto:[hidden email]]
Sent: Tuesday, June 05, 2007 5:28 PM
To: [hidden email]
Subject: tomcat context fragment

Hello All,

 

I've been working with solr on Tomcat 5.5/Windows and had success
setting my solr home using the context fragment.  However, I cannot get
it to work on Tomcat 5.028/Unix.  I've read and re-read the Apache
Tomcat documentation and cannot find a solution.  Has anyone run into
this issue?  Is there some Tomcat setting that is preventing this from
working?

 

Thanks,

Mike

Reply | Threaded
Open this post in threaded view
|

RE: tomcat context fragment

Chris Hostetter-3
: I've found the problem.
:
: The Context attribute path needed to be set:
:
: <Context path="/solr" docBase="/users/mp15/solr.war" debug="0"

Michael, i don't really know much about tomcat, but is this becuase you
had a single config file for all context (the examples on our wiki suggest
that tomcat knows which contaxt path you want based on the name of hte
context fragment file)

is that something thta change between tomcat 5.0X and tomcat 5.5? (one
config file vs context fragment config files)



-Hoss

Reply | Threaded
Open this post in threaded view
|

RE: tomcat context fragment

Park, Michael
Hi Chris,

No.  I set up a separate file, same as the wiki.  

It's either a tomcat version issue or a difference between how tomcat on
my Win laptop is configured vs. the configuration on our tomcat Unix
machine.

I intend to run multiple instances of solr in production and wanted to
use the context fragments.

I have 3 test instances of solr running now (with 3 context files) and
found that whatever you set the path attribute to becomes the name of
the deployed web app (it doesn't have to match the name of the context
file, but cleaner to keep the names the same).

Here is what I found on the Apache site about this:
        "The context path of this web application, which is matched
against
        the beginning of each request URI to select the appropriate web
application for processing. All of the context paths within a
particular Host must be unique. If you specify a context path of an
empty string (""), you are defining the default web application for
this Host, which will process all requests not assigned to other
Contexts."

~Mike

-----Original Message-----
From: Chris Hostetter [mailto:[hidden email]]
Sent: Wednesday, June 06, 2007 2:53 PM
To: [hidden email]
Subject: RE: tomcat context fragment

: I've found the problem.
:
: The Context attribute path needed to be set:
:
: <Context path="/solr" docBase="/users/mp15/solr.war" debug="0"

Michael, i don't really know much about tomcat, but is this becuase you
had a single config file for all context (the examples on our wiki
suggest
that tomcat knows which contaxt path you want based on the name of hte
context fragment file)

is that something thta change between tomcat 5.0X and tomcat 5.5? (one
config file vs context fragment config files)



-Hoss

Reply | Threaded
Open this post in threaded view
|

RE: tomcat context fragment

Chris Hostetter-3
: Here is what I found on the Apache site about this:

...i think you are refering to...

http://tomcat.apache.org/tomcat-5.0-doc/config/context.html

..correct?  it definitely seems to be something that was changed in 5.5.
Note the added sentence in the 5.5 docs...

   "The value of this field must not be set except when statically
    defining a Context in server.xml, as it will be inferred from the
    filenames used for either the .xml context file or the docBase."

I've updated the wiki with a small note about this...

http://wiki.apache.org/solr/SolrTomcat


-Hoss