From: <bra...@us...> - 2010-05-18 23:46:17
|
Revision: 3123 http://archive-access.svn.sourceforge.net/archive-access/?rev=3123&view=rev Author: bradtofel Date: 2010-05-18 23:46:07 +0000 (Tue, 18 May 2010) Log Message: ----------- INITIAL REV: jsp to redirect users to a target URL. designed to be used when users enter Wayback from a deep link Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2010-05-18 23:46:07 UTC (rev 3123) @@ -0,0 +1,52 @@ +<%@ +page import="org.archive.wayback.webapp.AccessPoint" +%><%@ +page import="org.archive.wayback.util.StringFormatter" +%><% +String toUrl = request.getParameter(AccessPoint.INTERSTITIAL_TARGET); +if(toUrl == null) { + response.setStatus(400); +%> +<html> + <body> + Bad request. require argument <%= AccessPoint.INTERSTITIAL_TARGET %> + </body> +</html> +<% +} else { + String secsS = request.getParameter(AccessPoint.INTERSTITIAL_SECONDS); + int secs = 5; + try { + secs = Integer.parseInt(secsS); + } catch (NumberFormatException e) { + + } + if(secs < 1) { + secs = 5; + } + StringFormatter f = new StringFormatter(null,null); + String safeTargetUrl = f.escapeHtml(toUrl); + String safeTargetUrlJS = f.escapeJavaScript(toUrl); + %> +<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" /> + <script type="text/javascript"> + function go() { + document.location.href = "<%= safeTargetUrlJS %>"; + } + window.setTimeout("go()",<%= secs * 1000 %>); + </script> + <h2>Redirecting...</h2> + <p> + Thanks for visiting the Wayback Machine. We're about to redirect you + to the page you requested: + </p> + <p><%= safeTargetUrl %></p> + <p> + in <%= secs %> seconds. + Click <a href="<%= safeTargetUrl %>">here</a> to go now. + </p> +jsp:include page="/WEB-INF/template/UI-footer.jsp" flush="true" /> +<% +} +%> +< \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-06-01 22:03:29
|
Revision: 3144 http://archive-access.svn.sourceforge.net/archive-access/?rev=3144&view=rev Author: bradtofel Date: 2010-06-01 22:03:23 +0000 (Tue, 01 Jun 2010) Log Message: ----------- New template system uses a single wrapper, which includes content from a delegate .jsp Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2010-06-01 21:46:15 UTC (rev 3143) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2010-06-01 22:03:23 UTC (rev 3144) @@ -1,17 +1,11 @@ -<%@ -page import="org.archive.wayback.webapp.AccessPoint" -%><%@ -page import="org.archive.wayback.util.StringFormatter" +<%@ page import="org.archive.wayback.webapp.AccessPoint" +%><%@ page import="org.archive.wayback.util.StringFormatter" %><% String toUrl = request.getParameter(AccessPoint.INTERSTITIAL_TARGET); if(toUrl == null) { response.setStatus(400); %> -<html> - <body> Bad request. require argument <%= AccessPoint.INTERSTITIAL_TARGET %> - </body> -</html> <% } else { String secsS = request.getParameter(AccessPoint.INTERSTITIAL_SECONDS); @@ -28,7 +22,6 @@ String safeTargetUrl = f.escapeHtml(toUrl); String safeTargetUrlJS = f.escapeJavaScript(toUrl); %> -<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" /> <script type="text/javascript"> function go() { document.location.href = "<%= safeTargetUrlJS %>"; @@ -45,7 +38,6 @@ in <%= secs %> seconds. Click <a href="<%= safeTargetUrl %>">here</a> to go now. </p> -jsp:include page="/WEB-INF/template/UI-footer.jsp" flush="true" /> <% } %> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-08-04 01:13:04
|
Revision: 3209 http://archive-access.svn.sourceforge.net/archive-access/?rev=3209&view=rev Author: bradtofel Date: 2010-08-04 01:12:58 +0000 (Wed, 04 Aug 2010) Log Message: ----------- TWEAK: replaced template header/footer with standards Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2010-08-04 01:09:30 UTC (rev 3208) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2010-08-04 01:12:58 UTC (rev 3209) @@ -22,7 +22,7 @@ String safeTargetUrl = f.escapeHtml(toUrl); String safeTargetUrlJS = f.escapeJavaScript(toUrl); %> - <jsp:include page="/WEB-INF/global-template/UI-header.jsp" flush="true" /> + <jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" /> <div id="positionHome"> <section> @@ -52,4 +52,4 @@ </section> <div id="errorBorder"></div> -<jsp:include page="/WEB-INF/global-template/UI-footer.jsp" flush="true" /> \ No newline at end of file +<jsp:include page="/WEB-INF/template/UI-footer.jsp" flush="true" /> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2011-02-06 14:56:06
|
Revision: 3411 http://archive-access.svn.sourceforge.net/archive-access/?rev=3411&view=rev Author: bradtofel Date: 2011-02-06 14:56:00 +0000 (Sun, 06 Feb 2011) Log Message: ----------- BUGFIX: was not working before - now uses info that should be set by AccessPoint prior to delegating to this jsp Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2011-02-06 14:54:55 UTC (rev 3410) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2011-02-06 14:56:00 UTC (rev 3411) @@ -1,5 +1,6 @@ <%@ page import="org.archive.wayback.webapp.AccessPoint" %><%@ page import="org.archive.wayback.util.StringFormatter" +%><%@ page import="java.util.Date" %><% String toUrl = request.getParameter(AccessPoint.INTERSTITIAL_TARGET); if(toUrl == null) { @@ -8,22 +9,38 @@ Bad request. require argument <%= AccessPoint.INTERSTITIAL_TARGET %> <% } else { - String secsS = request.getParameter(AccessPoint.INTERSTITIAL_SECONDS); - int secs = 5; + String secsS = request.getParameter(AccessPoint.INTERSTITIAL_SECONDS); + String dateString = request.getParameter(AccessPoint.INTERSTITIAL_DATE); + String replayUrl = request.getParameter(AccessPoint.INTERSTITIAL_URL); + long dateLong = 0; + int secs = 5; try { secs = Integer.parseInt(secsS); } catch (NumberFormatException e) { - } + try { + dateLong = Long.parseLong(dateString); + } catch (NumberFormatException e) { + } if(secs < 1) { secs = 5; } - StringFormatter f = new StringFormatter(null,null); + StringFormatter f = new StringFormatter(null); + String safeReplayUrl = null; + String prettyReplayDate = null; + if(replayUrl != null) { + safeReplayUrl = f.escapeHtml(replayUrl); + } + if(dateLong > 0) { + Date rd = new Date(dateLong); + prettyReplayDate = + f.format("{0,date,H:mm:ss MMM d, yyyy}",rd); + } String safeTargetUrl = f.escapeHtml(toUrl); String safeTargetUrlJS = f.escapeJavaScript(toUrl); %> <jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" /> - + <!-- dateLong <%= dateLong %> --> <div id="positionHome"> <section> <div id="logoHome"> @@ -38,11 +55,18 @@ } window.setTimeout("go()",<%= secs * 1000 %>); </script> - <h2 class="blue">Hello.</h2> + <h2 class="blue">Welcome to Wayback.</h2> <p class="code">Loading...</p> - <p class="code shift">[Month 00, 0000]</p> - <p class="code">Loading...</p> - <p class="code shift"><%= safeTargetUrl %></p> + <% + if(safeReplayUrl != null && prettyReplayDate != null) { + %> + <p class="code shift"><%= safeReplayUrl %></p> + <p class="code">as close to the date:</p> + <p class="code shift"><%= prettyReplayDate %></p> + <p class="code">as is available..</p> + <% + } + %> <p class="impatient"><a href="<%= safeTargetUrl %>">Impatient?</a></p> <% } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |