问题总结:
1.问:出现HTTP404错误
HTTP Status 404 – Not Found
Type Status Report
Message /solr/index.html
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.错误
解决方法:
将solr-6.6.0/server/lib下的五个以M为前缀的JAR包放到WEB-INF/lib目录下
2.出现HTTP403错误
HTTP Status 403 – Forbidden
Type Status Report
Message Access to the requested resource has been denied
Description The server understood the request but refuses to authorize it.
解决方法:
在web.xml的最后两行找到
<security-constraint>
<web-resource-collection>
<web-resource-name>Disable TRACE</web-resource-name>
<url-pattern>/</url-pattern>
<http-method>TRACE</http-method>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Enable everything but TRACE</web-resource-name>
<url-pattern>/</url-pattern>
<http-method-omission>TRACE</http-method-omission>
</web-resource-collection>
</security-constraint>
删掉即可。