Project

General

Profile

« Previous | Next » 

Revision 5004

Added by daigle over 15 years ago

Use context url instead of server IP. Server IP breaks if the server does not have an externally facing IP (behind a proxy server)

View differences:

lib/admin/metacat-configuration.jsp
40 40
    String geoserverConfigured = (String)request.getAttribute("geoserverConfigured");
41 41
    Boolean metacatConfigured = (Boolean)request.getAttribute("metacatConfigured");
42 42
    Boolean metacatServletInitialized = (Boolean)request.getAttribute("metcatServletInitialized");
43
    String contextURL = (String)request.getAttribute("contextURL");
43 44
%>
44 45

  
45 46
<html>
......
217 218
	   For Tomcat, this would mean calling "sudo /etc/init.d/tomcat5.5 restart" or
218 219
	   an equivalent command appropriate to your operating system. After restarting,
219 220
	   you can access your new Metacat server at the URL:
220
 	  <a href="<%= request.getScheme() + "://" + 
221
	       request.getServerName() + ":" + request.getServerPort() +
222
	       request.getContextPath() %>"><%= request.getScheme() + "://" + 
223
                request.getServerName() + ":" + request.getServerPort() +
224
                request.getContextPath() %></a>
221
      <a href="<%= contextURL %>"><%= contextURL  %></a>
225 222
	</p>
226 223
<%
227 224
		} else {
src/edu/ucsb/nceas/metacat/admin/MetaCatAdminServlet.java
145 145
			    if (PropertyService.arePropertiesConfigured()) {
146 146
					request.setAttribute("databaseVersion", 
147 147
							DBAdmin.getInstance().getDBVersion());
148
					request.setAttribute("contextURL", SystemUtil.getContextURL());
148 149
				}
149 150
				RequestUtil.forwardRequest(request, response,
150 151
						"/admin/metacat-configuration.jsp?configureType=configure");

Also available in: Unified diff