If you unpack the solr.war file,you'll find some configures in web.xml like:
    <filter>
        <filter-name>SolrRequestFilter</filter-name>
        <filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>SolrRequestFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <servlet>
        <servlet-name>Zookeeper</servlet-name>
        
<servlet-class>org.apache.solr.servlet.ZookeeperInfoServlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>LoadAdminUI</servlet-name>
        
<servlet-class>org.apache.solr.servlet.LoadAdminUiServlet</servlet-class>
    </servlet>

and so on…

These configurations tells your application how to dispatch requests to solr.

Note that the SolrRequestFilter in solr.war's web.xml mapped to url pattern /*, 
if you want to make some sub-context for solr,maybe it should like /solr/* 
,then you need put the web resources like admin.html/css/img/js/tpl from 
solr.war in the *same* directory of your web app's WebRoot folder.For 
example,if you make SolrRequestFilter mapped to url pattern to /solr/* ,your 
WebRoot dir is looks like:

WebRoot
        |
        ----solr
                |
                ---admin.html
                |
                ---css
                |……..

It is what the comment said in web.xml of solr.war,and I think it also what 
make you confused like you asked in the original email thread.

In my web.xml , I just copy the whole content of solr,paste them in mine and 
edit some url mapping.

在 2013-4-26,下午10:04,Peri Subrahmanya <peri.subrahma...@htcinc.com> 写道:

> Jundan,
> 
> I got all the setup correctly i.e got the maven dependencies, and using
> maven overlay copy all the solr files to the WEB-INF directory and also
> specify solr.home. The issue is that when I try to access any of the solr
> urls like /admin.html or /dataimport, nothing seems to be happening.
> 
> So I m not sure  how to correctly the web.xml; Would it be possible to
> share your web.xml please?
> 
> Thank you,
> Peri Subrahmanya
> HTC Global Services
> (Development Manager for System Integration on Kuali OLE project @ Indiana
> University, Bloomington, USA)
> Cell: (+1) 618.407.3521
> Skype/Gtalk: peri.subrahmanya
> 
> *** DISCLAIMER *** This is a PRIVATE message. If you are not the
> intended recipient, please delete without copying and kindly advise us
> by e-mail of the mistake in delivery.
> NOTE: Regardless of content, this e-mail shall not operate to bind HTC
> Global Services to any order or other contract unless pursuant to
> explicit written agreement or government initiative expressly permitting
> the use of e-mail for such purpose.
> 
> 
> 
> 
> On 4/26/13 9:51 AM, "jnduan" <jnd...@gmail.com> wrote:
> 
>> Hi Peri,
>> I think that document mesa you can deploy your own web app and solr in
>> one container like tomcat,but with different
>> context path.
>> If you want to bring solr in your project, you just need add some maven
>> dependencies like:
>> <dependency>
>>           <groupId>org.apache.solr</groupId>
>>           <artifactId>solr-core</artifactId>
>>           <version>4.2.1</version>
>> </dependency>
>> <dependency>
>>           <groupId>org.apache.solr</groupId>
>>           <artifactId>solr-test-framework</artifactId>
>>           <version>${solr.version}</version>
>> </dependency>
>> 
>> This is what I do exactly.
>> Then you need to prefer a 'solr.home' dir in your project,and write some
>> code in web.xml to configure some filter and servlet what solr need.I
>> copied those configures and some admin page form solr.war.
>> 
>> I hope this could help ,best regards!
>> 
>> 
>> 在 2013-4-25,上午12:58,Peri Subrahmanya <peri.subrahma...@htcinc.com> 写道:
>> 
>>> I m trying to use solr as part of another maven based web application.
>>> I m
>>> not sure how to wire the two war files. Any help please? I found this
>>> documentation in SOLR but unsure how to go about it.
>>> 
>>> <!-- If you are wiring Solr into a larger web application which controls
>>>        the web context root, you will probably want to mount Solr under
>>>        a path prefix (app.war with /app/solr mounted into it, for
>>> example).
>>>        You will need to put this prefix in front of the
>>> SolrDispatchFilter
>>>        url-pattern mapping too (/solr/*), and also on any paths for
>>>        legacy Solr servlet mappings you may be using.
>>>        For the Admin UI to work properly in a path-prefixed
>>> configuration,
>>>        the admin folder containing the resources needs to be under the
>>> app context root
>>>        named to match the path-prefix.  For example:
>>> 
>>>           .war
>>>              xxx
>>>                js
>>>                  main.js
>>>   -->
>>>   <!--
>>>   <init-param>
>>>     <param-name>path-prefix</param-name>
>>>     <param-value>/xxx</param-value>
>>>   </init-param>
>>>   -->
>>> 
>>> 
>>> Thank you,
>>> Peri Subrahmanya
>>> 
>>> 
>>> 
>>> 
>>> On 4/24/13 12:52 PM, "Michael Della Bitta"
>>> <michael.della.bi...@appinions.com> wrote:
>>> 
>>>> "solrservice.php" and the text of that error both sound like parts of
>>>> Typo3... they're definitely not part of Solr. You should ask on a list
>>>> devoted to Typo3 to figure out what to do in this situation. It likely
>>>> won't involve reconfiguring Solr.
>>>> 
>>>> Michael Della Bitta
>>>> 
>>>> ------------------------------------------------
>>>> Appinions
>>>> 18 East 41st Street, 2nd Floor
>>>> New York, NY 10017-6271
>>>> 
>>>> www.appinions.com
>>>> 
>>>> Where Influence Isn¹t a Game
>>>> 
>>>> 
>>>> On Wed, Apr 24, 2013 at 11:53 AM, vishal gupta
>>>> <vishalgup...@yahoo.co.in>
>>>> wrote:
>>>>> Hi i am using Solr 4.2.0 and extension 2.8.2  with Typo3. Whever I try
>>>>> to do
>>>>> indexing pages and news pages It gets only 3.29% indexed. I checked a
>>>>> developer log and found error in solrservice.php. And in solr admin it
>>>>> is
>>>>> giving "Dups is not defined please add it". What should i do in this
>>>>> case?
>>>>> If possible please send me the settings of schema.xml and
>>>>> solrconfig.xml .i
>>>>> am new to typo3 and solr both.
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> View this message in context:
>>>>> 
>>>>> http://lucene.472066.n3.nabble.com/Solr-indeing-Partially-working-tp405
>>>>> 86
>>>>> 23.html
>>>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> 
>>> *** DISCLAIMER *** This is a PRIVATE message. If you are not the
>>> intended recipient, please delete without copying and kindly advise us
>>> by e-mail of the mistake in delivery.
>>> NOTE: Regardless of content, this e-mail shall not operate to bind HTC
>>> Global Services to any order or other contract unless pursuant to
>>> explicit written agreement or government initiative expressly permitting
>>> the use of e-mail for such purpose.
>>> 
>>> 
>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> *** DISCLAIMER *** This is a PRIVATE message. If you are not the intended 
> recipient, please delete without copying and kindly advise us by e-mail of 
> the mistake in delivery.
> NOTE: Regardless of content, this e-mail shall not operate to bind HTC Global 
> Services to any order or other contract unless pursuant to explicit written 
> agreement or government initiative expressly permitting the use of e-mail for 
> such purpose.
> 
> 

Reply via email to