How does one protect a webapp to be accessed only by localhost?
问题 I am planning to run a java web application and solr in the same java container. I want the web application to be publicly accessible but solr to be accessible only to the other web applications in the same container. Solr should be accessible only as localhost and not from outside. Can we write some rules in the web-xml to achieve this? 回答1: This is actually a question for serverfault. Anyway, you can deal with this the same way you deal with any internal server, like a database server: don