It is common knowledge that a web-application cannot know it's port and host-name:
- many possible cnames to host-name
- potential tunnels
- most important and most used: proxies, typically an apache mod_proxy or mod_webapp on a port different than the servlet container port.


Le 06-juin-09 à 09:38, Noble Paul നോബിള്‍ नोब्ळ् a écrit :
can it be added into the solrconfig.xml or solr.xml ?

My experience is that it is simple as that: you have to configure something which, in ActiveMath, we have called the "advertizedURL".

Making it non-configurable really often creates issues and requires the deployer to dig deep into the servlet container configuration (I never was fully able with mod_proxy and tomcat). Defaulting to something such as request.getServerPort etc is probably right though.

hope it helps.

paul

On Sat, Jun 6, 2009 at 10:55 AM, Shalin Shekhar
Mangar<shalinman...@gmail.com> wrote:
On Sat, Jun 6, 2009 at 9:58 AM, Grant Ingersoll <gsing...@apache.org> wrote:

Does Solr know what host and port it is running on and, if so, how do I get access to it programmatically? I feel like I'm missing something obvious.


No, it does not. You can only get this on the first request.

There's an issue open at https://issues.apache.org/jira/browse/SOLR-727

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to