在 Tomcat 中部署战争 [英] deploy war in Tomcat
问题描述
我想在Tomcat5.5中部署solr.war.我已经在 webapps 中复制了 solr.war 文件并将其解压缩.在运行 http://localhost:8080/solr/ 时,我面临以下异常.请建议我我需要做什么.
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.
无法启动 SOLR.检查 solr/home属性 java.lang.RuntimeException:找不到资源solrconfig.xml"在类路径或solr/conf/"中,cwd=C:\Program Files\Apache 软件Foundation\Tomcat 5.5\bin"
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"
它说在类路径中包含 solrconfig.xml 但我没有找到任何 .classpath 文件.
it is saying to include solrconfig.xml in classpath but i m not finding any .classpath file.
推荐答案
在 cofig/catalina/localhost 文件夹中创建一个文件 solr.xml .添加此上下文
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>
将文件手动从 D:\project\Solr_Integration\apache-solr-4.0.0\example\solr 复制到以下路径 D:\project\Solr_Integration\solr
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
启动服务器.
这篇关于在 Tomcat 中部署战争的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!