From: <bra...@us...> - 2008-01-30 01:56:36
|
Revision: 2151 http://archive-access.svn.sourceforge.net/archive-access/?rev=2151&view=rev Author: bradtofel Date: 2008-01-29 17:56:39 -0800 (Tue, 29 Jan 2008) Log Message: ----------- FEATURE: added (quite ugly) message with links to configured AccessPoints when users visit the webapp context root, and have not specified an AccessPoint within that context. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/index.jsp Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/index.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/index.jsp 2008-01-30 01:54:12 UTC (rev 2150) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/index.jsp 2008-01-30 01:56:39 UTC (rev 2151) @@ -1,3 +1,4 @@ +<%@ page import="java.util.ArrayList" %> <%@ page import="org.archive.wayback.core.UIResults" %> <%@ page import="org.archive.wayback.util.StringFormatter" %> <jsp:include page="template/UI-header.jsp" flush="true" /> @@ -4,6 +5,22 @@ <% UIResults results = UIResults.getFromRequest(request); StringFormatter fmt = results.getFormatter(); +Object names = request.getAttribute("AccessPointNames"); +if(names != null) { + if(names instanceof ArrayList) { + ArrayList<String> accessPoints = (ArrayList<String>) names; + if(accessPoints.size() > 0) { + %> + You seems to be accessing this Wayback via an incorrect URL. Please try one of the following AccessPoints:<br></br> + <% + } + for(String accessPoint : accessPoints) { + %> + <a href="<%= accessPoint %>/"><%= accessPoint %></a><br></br> + <% + } + } +} %> <p> <%= fmt.format("UIGlobal.indexPage") %> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |