tiles2

Tiles Integration with Struts 2 Annotation

北城以北 提交于 2019-12-06 06:18:12
I have been trying to integrate Tiles with Struts 2 annotation based action but it's not working correctly. As I don't have struts-config.xml and in every tutorial available at web they are referencing it with struts-config.xml . First is it possible to integrate annotation based struts action with tiles. If yes then how? @Action(value="/login",results={@Result(name="success",location="/home",type=TilesResult.class), @Result(name="login",location="/jsp/userLogin.jsp")}) public String execute() { This is what my code is but it always gives me error in MyEclipse at TilesResult.class that Type

Apache Tiles alternatives

不想你离开。 提交于 2019-12-05 00:26:35
I am writing a Spring MVC application and looking for a way to do layouts in views. The only option that i see is Apache Tiles, which i have used before and know how painful it is to maintain its configuration. Are there any good alternatives? I looked at SiteMesh and Spring Surf both seem to be dormant. I faced the same dilemma about a month ago. I have been a seasoned developer using apache tiles, and I wanted to try something different. I did some research and found that Spring MVC has some integration with freemarker and sitemesh. I decided to give both a shot. Tiles seems to have the most

Multiple result types in Struts2?

柔情痞子 提交于 2019-12-04 05:29:02
问题 I have a Struts2 application where I using Tiles. How can I get multiple result types in action-mappings? because I need to set de output as JSON data, and Tiles simultaneous. I have tried: <action name="home" class="com.deveto.struts.actions.HomeAction" > <result name="success" type="tiles,json">tiles.home</result> </action> But this isn't working 回答1: To my knowledge there is no way to return multiple things simultaneously. The browser will only be expecting one thing, either the JSON or

Propagating a Tiles attribute down the include chain

佐手、 提交于 2019-12-03 15:44:38
问题 I'm using Tiles and I'd like an attribute defined for a page to be readable inside of one of the included subpages as follows: tiles-definitions.xml : <definition name="page" template="/WEB-INF/tiles/layout/page.jsp"> <put-attribute name="header" value="/WEB-INF/jsp/_include/header.jsp"/> <put-attribute name="footer" value="/WEB-INF/jsp/_include/footer.jsp"/> </definition> <definition name="tutorial" extends="page"> <put-attribute name="title" value="Tutorial"/> <put-attribute name="body"

Integrating Spring Webflow 2 and Apache Tiles [closed]

感情迁移 提交于 2019-12-03 06:23:38
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I've recently started upgrading some applications to use Spring Webflow 2, and I want to make use of the new Ajax functionality that comes with Webflow 2. Can somebody please direct me to a tutorial for integrating Tiles 2 with Spring Webflow (since that's apparently what they recommend). I've found the

Propagating a Tiles attribute down the include chain

点点圈 提交于 2019-12-03 05:11:31
I'm using Tiles and I'd like an attribute defined for a page to be readable inside of one of the included subpages as follows: tiles-definitions.xml : <definition name="page" template="/WEB-INF/tiles/layout/page.jsp"> <put-attribute name="header" value="/WEB-INF/jsp/_include/header.jsp"/> <put-attribute name="footer" value="/WEB-INF/jsp/_include/footer.jsp"/> </definition> <definition name="tutorial" extends="page"> <put-attribute name="title" value="Tutorial"/> <put-attribute name="body" value="/WEB-INF/jsp/tutorial.jsp"/> </definition> The page.jsp represents a simple page structure: <html>

Integrating Spring Webflow 2 and Apache Tiles [closed]

笑着哭i 提交于 2019-12-02 19:48:07
I've recently started upgrading some applications to use Spring Webflow 2, and I want to make use of the new Ajax functionality that comes with Webflow 2. Can somebody please direct me to a tutorial for integrating Tiles 2 with Spring Webflow (since that's apparently what they recommend). I've found the documentation that comes with Webflow 2 in this regard to be absolutely useless. This is what I did to get it working with webflow 2 and tiles 2.0 <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"> <property name="definitions"> <list> <value>/WEB-INF

Struts2 MessageResources in Apache Tiles

两盒软妹~` 提交于 2019-12-02 06:37:56
问题 I'm trying unsuccessfully to use a Struts2 message resource in a tiles 2.1.4 expression. For example the following resource is available in the JSP... <s:text name="htmlheadHeading1"/><br/> ... but when I attempt to use the same resource in the tiles definition... <put-attribute name="title" expression="${htmlheadHeading1}" /> ... I get the error... ELResolver cannot handle a null base Object with identifier 'htmlheadHeading1' ... Is there any way to do this?? 回答1: This solution does not use

Multiple result types in Struts2?

我是研究僧i 提交于 2019-12-02 04:56:13
I have a Struts2 application where I using Tiles. How can I get multiple result types in action-mappings? because I need to set de output as JSON data, and Tiles simultaneous. I have tried: <action name="home" class="com.deveto.struts.actions.HomeAction" > <result name="success" type="tiles,json">tiles.home</result> </action> But this isn't working To my knowledge there is no way to return multiple things simultaneously. The browser will only be expecting one thing, either the JSON or the HTML once all the tiles stuff is done. I can think of two ways to do this: double request (one for each

HTML Multiple Heads

末鹿安然 提交于 2019-12-01 05:22:08
NOTE: I am in no way advocating multiple heads within a page I'm using Apache Tiles and I have a few tiles that include their own heads. The result of the Tiles renders into an HTML page with multiple heads. My questions: How is the resulting page handled in IE and Chrome? [It renders and appears successful] WITH APACHE TILES What is the best practice for dealing with/avoiding multiple heads [for CSS/Javascript] without having to demand all pages use the same JS and CSS files. For Example with Question Two: Lets say you have the following pages: home, profile, and gallery listing. Gallery