tiles

Redirect from one controller method to another controller method

不羁岁月 提交于 2019-11-27 03:45:48
问题 I am using Spring 3 and Tiles 2 in my application and have a bit of trouble with redirecting. Preferably, I would like to be able to just call or redirect from a Controller1 method to Controller2 method, but so far have been unsuccessful. I have tried to create a new entry in the pageviews.properties file. That way I could just return this name from Controller1 and it would look up my tiles def name from the xml files. createRejectionEmail.(parent)=tilesView createRejectionEmail.url

Using Spring, mapping to root in web.xml, static resources aren't found

你说的曾经没有我的故事 提交于 2019-11-26 23:37:45
What I'm trying to do is map requests to the servlet root (correct terminology?). I'm at the point where URLs are mapped to correct view but all the static content - css, javascript, images - that is part of the page cannot be found. So in my web.xml my servlet tag looks like this <servlet-mapping> <servlet-name>springapp</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> My controller looks something like this: @RequestMapping("/shop") public class TheShopController extends MyBaseController { public static String VIEW = "Tile.Shop"; @Override @RequestMapping(method = RequestMethod

How to integrate Struts 2 with Tiles 3

你离开我真会死。 提交于 2019-11-26 22:59:06
How do we integrate Struts 2 with Tiles 3? The struts2-tiles-plugin currently (2.3.4.1) works with an older version of tiles (version 2.0.6) this can be a bit of a nuisance. This is a self-answer, to help others with their integration. Thanks to Ken a new plugin was added to Struts 2 to support Tiles 3 result type, it should be available with upcoming new release - Struts 2.3.9 https://cwiki.apache.org/confluence/display/WW/Tiles+3+Plugin The solution is to add the required dependencies, load tiles with an appropriate listener and create a custom result type. Fortunately these steps are quite

Calculating tiles to display in a MapRect when “over-zoomed” beyond the overlay tile set

微笑、不失礼 提交于 2019-11-26 19:21:21
问题 I am working on an app that uses MKOverlay views to layer my own custom maps on top of the Google base map. I have been using Apple's excellent TileMap sample code (from WWDC 2010) as a guide. My problem - when "overzoomed" to a level of detail deeper than my generated tile set, the code displays nothing because there are no tiles available at the calculated Z level. The behavior I want - when "overzoomed" the app should just keep magnifying the deepest level of tiles. It is a good user

Can I serve JSPs from inside a JAR in lib, or is there a workaround?

好久不见. 提交于 2019-11-26 18:30:27
I have a web application deployed as a WAR file in Tomcat 7. The application is build as a multi-module project: core - packaged as JAR, contains most of the backend code core-api - packaged as JAR, contains interfaces toward core webapp - packaged as WAR, contains frontend code and depends on core customer-extensions - optional module, packaged as JAR Normally, we can put our JSP files in the webapp project, and reference them relative to the context: /WEB-INF/jsp/someMagicalPage.jsp The question is what we do about JSP files that are specific to the customer-extensions project, that should

Max square size for unknown number inside rectangle

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 16:35:20
问题 If I have a set of tiles (squares) which can be any number and they are to fill a container (rectangle) of an unknown size how do I work out the maximum size of the tiles without having any of them overlap. So if I have 2 tiles and the rectangle is 100 * 100 then the max tile size is 50 * 50. This would also be the max size of tile if there was 3 or 4 tiles for this size of rectanlgle, which just so happens to be a square in this example. If the rectanlge was 100 * 30 and I had 2 tiles, the

Accessing Spring beans from a Tiles view (JSP)

我怕爱的太早我们不能终老 提交于 2019-11-26 16:08:06
问题 In Spring MVC I can access my beans in JSP using JstlView's exposedContextBeanNames (or exposeContextBeansAsAttributes). For example, then, in my JSP I can write (${properties.myProperty). But when the same JSP is a part of a tiles view, these properties aren't accessible. Is possible to configure Tiles properly or access these properties in another way? I'm using Spring MVC 3.0.2 and Tiles 2.2.1. Here's a bit of my configuration: <bean id="tilesViewResolver" class="org.springframework.web

NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

做~自己de王妃 提交于 2019-11-26 13:28:37
问题 I'm trying to run the sample tiles example given here. Below is my POM.xml: <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.tiles</groupId> <artifactId>tiles-api</artifactId> <version>2.1.2</version> </dependency> <dependency> <groupId>org.apache.tiles</groupId> <artifactId>tiles-core</artifactId> <version>2.1.2</version> </dependency> <dependency> <groupId>org

Can I serve JSPs from inside a JAR in lib, or is there a workaround?

余生长醉 提交于 2019-11-26 08:55:20
问题 I have a web application deployed as a WAR file in Tomcat 7. The application is build as a multi-module project: core - packaged as JAR, contains most of the backend code core-api - packaged as JAR, contains interfaces toward core webapp - packaged as WAR, contains frontend code and depends on core customer-extensions - optional module, packaged as JAR Normally, we can put our JSP files in the webapp project, and reference them relative to the context: /WEB-INF/jsp/someMagicalPage.jsp The

Using Spring, mapping to root in web.xml, static resources aren&#39;t found

点点圈 提交于 2019-11-26 08:45:17
问题 What I\'m trying to do is map requests to the servlet root (correct terminology?). I\'m at the point where URLs are mapped to correct view but all the static content - css, javascript, images - that is part of the page cannot be found. So in my web.xml my servlet tag looks like this <servlet-mapping> <servlet-name>springapp</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> My controller looks something like this: @RequestMapping(\"/shop\") public class TheShopController extends