deploy war in Tomcat

2019-03-01 13:08发布

问题:

I want to deploy solr.war in Tomcat5.5. I have copied solr.war file in webapps and extract it. while running http://localhost:8080/solr/ i am facing wid following exception. please suggest me what i need to do.

Could not start SOLR. Check solr/home property java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or 'solr/conf/', cwd=C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin"

it is saying to include solrconfig.xml in classpath but i m not finding any .classpath file.

回答1:

Create a file solr.xml in cofig/catalina/localhost folder . Add this Context

<Context docBase="D:\project\Solr_Integration\apache-tomcat-6.0.35\webapps\solr.war" debug="0" crossContext="true" >
    <Environment name="solr/home" type="java.lang.String" value="D:\project\Solr_Integration\solr" override="true" />
</Context>

copy files manaully form here D:\project\Solr_Integration\apache-solr-4.0.0\example\solr in the following path D:\project\Solr_Integration\solr

Start the server .



标签: tomcat solr