tomcat7 - How to check inside Java code if the server is running in localhost -


i have need check @ runtime if server running in http://localhost searching on net haven't found solution. advice?

thank

we have running setup following configuration being done:

  1. in catalina.properties, define active_profile=prod production, active_profile=stage stage or active_profile=dev developer machine
  2. have different connection properties files matching profile key - jdbc_prod.properties, jdbc_stage.properties, jdbc_dev.properties
  3. refer connection properties jdbc_${active_profile}.properties in configuration.

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

html - Outlook 2010 Anchor (url/address/link) -