From: <bra...@us...> - 2010-08-10 20:03:45
|
Revision: 3221 http://archive-access.svn.sourceforge.net/archive-access/?rev=3221&view=rev Author: bradtofel Date: 2010-08-10 20:03:38 +0000 (Tue, 10 Aug 2010) Log Message: ----------- backing out all wrapper changes Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/UIResults.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/Renderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/JSPReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/UIResults.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/UIResults.java 2010-08-10 19:55:56 UTC (rev 3220) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/UIResults.java 2010-08-10 20:03:38 UTC (rev 3221) @@ -349,34 +349,6 @@ /** * Store this UIResults object in the given HttpServletRequest, then - * forward the request to wrapper, which *should* subsequently forward the - * request to target. - * - * @param request the HttpServletRequest - * @param response the HttpServletResponse - * @param target the String path to the .jsp to handle drawing the data, - * relative to the contextRoot (ex. "/WEB-INF/query/foo.jsp") - * @param wrapper the wrapper page which should generate the header, - * forward control to 'target' and then generate the footer. - * @throws ServletException for usual reasons... - * @throws IOException for usual reasons... - */ - public void forwardWrapped(HttpServletRequest request, - HttpServletResponse response, final String target, String wrapper) - throws ServletException, IOException { - - this.contentJsp = target; - this.originalRequestURL = request.getRequestURL().toString(); - request.setAttribute(FERRET_NAME, this); - RequestDispatcher dispatcher = request.getRequestDispatcher(wrapper); - if(dispatcher == null) { - throw new IOException("No dispatcher for " + target); - } - dispatcher.forward(request, response); - } - - /** - * Store this UIResults object in the given HttpServletRequest, then * forward the request to target, in this case, an image, html file, .jsp, * any file which can return a complete document. Specifically, this means * that if target is a .jsp, it must render it's own header and footer. Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java 2010-08-10 19:55:56 UTC (rev 3220) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java 2010-08-10 20:03:38 UTC (rev 3221) @@ -142,13 +142,7 @@ } } if(!handled) { - String wrapperJsp = wbRequest.getAccessPoint().getWrapperJsp(); - if(wrapperJsp != null) { - uiResults.forwardWrapped(httpRequest, httpResponse, - errorJsp, wrapperJsp); - } else { - uiResults.forward(httpRequest, httpResponse, errorJsp); - } + uiResults.forward(httpRequest, httpResponse, errorJsp); } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/Renderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/Renderer.java 2010-08-10 19:55:56 UTC (rev 3220) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/Renderer.java 2010-08-10 20:03:38 UTC (rev 3221) @@ -61,13 +61,7 @@ if(wbRequest.isXMLMode()) { uiResults.forward(httpRequest, httpResponse, xmlCaptureJsp); } else { - String wrapperJsp = wbRequest.getAccessPoint().getWrapperJsp(); - if(wrapperJsp != null) { - uiResults.forwardWrapped(httpRequest, httpResponse, - captureJsp, wrapperJsp); - } else { - uiResults.forward(httpRequest, httpResponse, captureJsp); - } + uiResults.forward(httpRequest, httpResponse, captureJsp); } } @@ -83,14 +77,7 @@ if(wbRequest.isXMLMode()) { uiResults.forward(httpRequest, httpResponse, xmlUrlJsp); } else { - String wrapperJsp = wbRequest.getAccessPoint().getWrapperJsp(); - if(wrapperJsp != null) { - - uiResults.forwardWrapped(httpRequest, httpResponse, - urlJsp,wbRequest.getAccessPoint().getWrapperJsp()); - } else { - uiResults.forward(httpRequest, httpResponse, urlJsp); - } + uiResults.forward(httpRequest, httpResponse, urlJsp); } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/JSPReplayRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/JSPReplayRenderer.java 2010-08-10 19:55:56 UTC (rev 3220) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/JSPReplayRenderer.java 2010-08-10 20:03:38 UTC (rev 3221) @@ -49,7 +49,6 @@ */ public class JSPReplayRenderer implements ReplayRenderer { private String targetJsp = null; - private boolean wrap = true; public void renderResource(HttpServletRequest httpRequest, HttpServletResponse httpResponse, WaybackRequest wbRequest, @@ -58,13 +57,8 @@ throws ServletException, IOException, WaybackException { UIResults uiResults = new UIResults(wbRequest, uriConverter, results, result, resource); - if(wrap) { - uiResults.forwardWrapped(httpRequest, httpResponse, - targetJsp, wbRequest.getAccessPoint().getWrapperJsp()); - } else { - uiResults.forward(httpRequest, httpResponse, - targetJsp); - } + uiResults.forward(httpRequest, httpResponse, + targetJsp); } /** @@ -82,23 +76,4 @@ public void setTargetJsp(String targetJsp) { this.targetJsp = targetJsp; } - - /** - * @return true if the jsp should be wrapped in the stardard UI template - * wrapper jsp for the AccessPoint. - */ - public boolean isWrap() { - return wrap; - } - - /** - * @param wrap if true then the jsp configured for this page will be - * wrapped in the standard template used for the current AccessPoint, if - * false then the jsp configured is responsible for rendering the entire - * content. - */ - public void setWrap(boolean wrap) { - this.wrap = wrap; - } - } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2010-08-10 19:55:56 UTC (rev 3220) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2010-08-10 20:03:38 UTC (rev 3221) @@ -105,8 +105,6 @@ private String queryPrefix = null; private String replayPrefix = null; -// private String wrapperJsp = "/WEB-INF/template/UI-wrapper.jsp"; - private String wrapperJsp = null; private String interstitialJsp = INTERSTITIAL_JSP; private String refererAuth = null; @@ -149,14 +147,7 @@ wbRequest.fixup(httpRequest); UIResults uiResults = new UIResults(wbRequest,uriConverter); try { - if(wrapperJsp != null && - translatedNoQuery.endsWith("-wrap.jsp")) { - - uiResults.forwardWrapped(httpRequest, httpResponse, - translatedQ, wrapperJsp); - } else { - uiResults.forward(httpRequest, httpResponse, translatedQ); - } + uiResults.forward(httpRequest, httpResponse, translatedQ); return true; } catch(IOException e) { // TODO: figure out if we got IO because of a missing dispatcher @@ -559,23 +550,8 @@ public String getQueryPrefix() { return getBestPrefix(queryPrefix,staticPrefix,replayPrefix); } - /** - * @return the String url prefix to use when generating self referencing - * replay URLs - */ - public String getWrapperJsp() { - return wrapperJsp; - } /** - * @param wrapperJsp the .jsp file responsible for generating the HTML - * wrapper for content. - */ - public void setWrapperJsp(String wrapperJsp) { - this.wrapperJsp = wrapperJsp; - } - - /** * @param interstitialJsp the interstitialJsp to set */ public void setInterstitialJsp(String interstitialJsp) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |