From: Jackson, A. <And...@bl...> - 2013-05-17 10:04:09
|
Hi, I'm trying to use recent version of Wayback, and am hitting the same two issue with 1.7.1-SNAPSHOT and 1.8.0-SNAPSHOT. The primary problem is that we expect to use the XML Query mode, like this: http://localhost:8080/wayback/archive/xmlquery.jsp?url=http://bits.wikim edia.org/skins-1.18/common/images/poweredby_mediawiki_88x31.png But instead of getting XML, we now get redirected to here: http://localhost:8080/wayback/archive/*/http://bits.wikimedia.org/skins- 1.18/common/images/poweredby_mediawiki_88x31.png <http://localhost:8080/wayback/archive/*/http:/bits.wikimedia.org/skins- 1.18/common/images/poweredby_mediawiki_88x31.png> Note that this is our replay config: --- <property name="query"> <bean class="org.archive.wayback.query.Renderer"> <property name="captureJsp" value="/WEB-INF/query/CalendarResults.jsp" /> --- I tracked this redirect down to this method: org.archive.wayback.archivalurl.requestparser.ArchivalUrlFormRequestPars er.parse(HttpServletRequest, AccessPoint) throwing a BetterURI exception, as a way of forcing a redirect to a URI that is neater. However, in this case, the 'neat' URI is wrong, as I am expecting XML. What should I do? Well, once I found the cause, I tried to disable the redirect, like this: <bean name="${wayback.port}:archive" class="org.archive.wayback.webapp.AccessPoint"> <property name="serveStatic" value="true" /> <property name="bounceToReplayPrefix" value="false" /> <property name="bounceToQueryPrefix" value="false" /> <property name="forceCleanQueries" value="false" /> Which worked at first, but then came up against the second, different problem, which is that the XMLCaptureResults JSP depends on a method that is now private: --- PWC6197: An error occurred at line: 38 in the jsp file: /WEB-INF/query/XMLCaptureResults.jsp PWC6199: Generated servlet error: toCanonicalStringMap() has protected access in org.archive.wayback.core.SearchResult PWC6199: Generated servlet error: /XMLCaptureResults_jsp.java uses or overrides a deprecated API. --- OR --- An error occurred at line: 40 in the jsp file: /WEB-INF/query/XMLCaptureResults.jsp The method toCanonicalStringMap() from the type SearchResult is not visible 37: <result> 38: <% 39: CaptureSearchResult result = itr.next(); 40: Map<String,String> p2 = result.toCanonicalStringMap(); 41: kitr = p2.keySet().iterator(); 42: 43: while(kitr.hasNext()) { --- I'm happy to help fix these issues, but both seem to relate to systematic changes that I'm not fully aware of (introducing 'better' URIs, and API changes), so I'd like some advice from the current developers first. Thanks, Andy -- Dr Andrew N Jackson Web Archiving Technical Lead The British Library Tel: 01937 546602 Mobile: 07765 897948 Web: www.webarchive.org.uk <http://www.webarchive.org.uk/> Twitter: @UKWebArchive |