tiles

NPE in StrutsTestCase after enabling Tiles

[亡魂溺海] 提交于 2019-12-23 15:44:22
问题 I developed some JUnit tests that extend org.apache.struts2.StrutsTestCase. I used the tutorial on struts.apache.org as my starting point. Everything was working fine until I modified my simple web application to use Tiles. I have Tiles working fine in the app but now my Action test cases have stopped working. I'm getting NullPointerException at org.apache.struts2.views.tiles.TilesResult.doExecute when I run the following line of code: ActionProxy proxy = getActionProxy("/displaytag.action");

Why is a “redirect” (that is, `return “redirect:/myPage”`) not working for my Tiles page definition?

試著忘記壹切 提交于 2019-12-23 03:29:51
问题 Why is my "redirect" (that is, return "redirect:/myPage" ) not working? Note: "myPage" is a Tiles page definition. (FWIW, the solution to a "double-submit" issue I am having is use a redirect to "myPage". But I am unable to get the "redirect" to work.) So far, I've tried the following. return new ModelAndView("redirect:/myPage")) return new ModelAndView("redirect:/myPage.jsp")) return new ModelAndView("redirect:/views/myPage")) return new ModelAndView("redirect:/views/myPage.jsp")) return new

JS: how to algorithmically highlight a diamond-shaped selection of x/y coordinates?

谁说胖子不能爱 提交于 2019-12-23 02:01:59
问题 If given an array of arrays creating an n x n map of tiles, is there a way to loop through an algorithm that would highlight tiles which form a diamond shape? (the key problem is not to hardcode it, so it could work for any sized map) For example: if the map was 5x5 tiles like so: XXXXX XXXXX XXXXX XXXXX XXXXX How could an algorithm highlight a diamond shape like so: XXOXX XOOOX OOOOO XOOOX XXOXX 回答1: [Working example] function diamond(arr) { var len = arr.length; var mid = Math.floor(len / 2

Spring MVC 3 & Tiles 2: static resources are not displayed, even in non-tiles pages

旧城冷巷雨未停 提交于 2019-12-22 18:39:24
问题 I'm trying to configure and integrate Tiles 2.2 to a webapp build with Spring MVC 3 and Spring Security 3 but I'm having some difficulties: Tiles definitions are not being displayed. No static resources (css, js) are being loaded either, even the ones that are called from pages that are not using Tiles. NOTE 1: when I click on the .css and .js links of the jsp files that don't use Tiles , I'm always redirected to the index page. NOTE 2: Before adding Tiles, everything worked just fine. web

Error resolving template “pages”, template might not exist or might not be accessible by any of the configured Template Resolvers

别等时光非礼了梦想. 提交于 2019-12-22 13:12:31
问题 I did a project using Spring with Thymeleaf and Tiles with the following structure : I have configured my Spring-Servlet : <bean id="templateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver"> <property name="prefix" value="/WEB-INF/templates/" /> <property name="suffix" value=".html" /> <property name="characterEncoding" value="UTF-8" /> <property name="templateMode" value="HTML5" /> </bean> <bean id="tilesConfigurer" class="org.thymeleaf.extras.tiles2.spring4

Error resolving template “pages”, template might not exist or might not be accessible by any of the configured Template Resolvers

瘦欲@ 提交于 2019-12-22 13:11:13
问题 I did a project using Spring with Thymeleaf and Tiles with the following structure : I have configured my Spring-Servlet : <bean id="templateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver"> <property name="prefix" value="/WEB-INF/templates/" /> <property name="suffix" value=".html" /> <property name="characterEncoding" value="UTF-8" /> <property name="templateMode" value="HTML5" /> </bean> <bean id="tilesConfigurer" class="org.thymeleaf.extras.tiles2.spring4

ServletException in '/left.do': java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.tiles.leftlogged_jsp

旧时模样 提交于 2019-12-22 11:34:06
问题 After integrating ESAPI into a login form I am getting a rendering issue and an error after a successful login. The error generated in the browser states: javax.servlet.ServletException: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in '/left.do': java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.tiles.leftlogged_jsp And the server's debug log states the following: SEVERE: Servlet.service() for servlet

Android Google Maps api v2 stops loading tiles

人走茶凉 提交于 2019-12-21 22:10:11
问题 Upon loading the fragment it loads initial tiles. After that, it stops loading more detailed tiles automatically as the map moves according to GPS position. If I swipe the map it'll load all additional tiles. At some point I'll get past the point where it had loaded tiles and I'll have to swipe the screen to download more detailed tiles. I've added android:heapLarge="true" to the manifest, but that doesn't solve the issue. http://i60.tinypic.com/rr8sd1.png Edit: I've figured out why this was

How to scroll and zoom in/out large images on iPhone?

若如初见. 提交于 2019-12-21 20:17:37
问题 I have a large image, size around 30000 (w) x 6000 (h) pixels. You may consider it's like a big map. I assume I need to crop it up into smaller tiles. Questions: what are the right ViewControllers to use? (link) what is the tile strategy? (I put this in another question, as it's not iPhone specific) Requirements: whole image (though cropped) can be scrolled up/down/left/right by swipes zoom in (up to pixel-to-pixel) out (down to screen-fit-by-height) by the 2-finger operation memory

Preventing overlays from disappearing when zoomed - MKMapView & MKOverlay

女生的网名这么多〃 提交于 2019-12-21 04:56:07
问题 I am working on an iPhone / iPad app that is using semi-transparant tiled map overlays via MKMapView and MKOverlay. I want users to be able to zoom in deeply into the maps, but the resolution of my map overlays only goes to level 6. I do not want to limit zooming. But... If a user zooms "too far" and then scrolls to a new tile, if they are zoomed deeper than the tree of overlay tiles, my overlay is not drawn. I want the overlay to draw even when the user is zoomed in deep. Are there any best