You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Todd Prickett <to...@hotmail.com> on 2007/12/19 22:20:10 UTC

Spring + Tiles not working

I'm trying to wire tiles (from Struts 1.3 jars) into Spring 2.0.7 and Spring Web Flow 1.0.5.In doing so, I'm receiving the error: No Tiles definition found for name '/WEB-INF/jsp/defs/loginForm.jsp'My tiles-defs.xml looks like:<definition id="template" name="template" page="/WEB-INF/jsp/defs/template.jsp" controllerClass="org.apache.struts.tiles.actions.T ilesAction" ><put name="heading" value="/WEB-INF/jsp/fragments/heading.jspf"/><put name="header" value="/WEB-INF/jsp/fragments/header.jspf"/><put name="nav" value="/WEB-INF/jsp/fragments/nav.jspf"/><put name="content" value="/WEB-INF/jsp/fragments/empty.jspf"/><put name="footer" value="/WEB-INF/jsp/fragments/footer.jspf"/></definition>My servlet-config.xml looks like:<bean id="viewResolver" class="org.springframework.web.servlet.view.Intern alResourceViewResolver"><property name="order" value="10"/><property name="requestContextAttribute" value="requestContext"/><property name="viewClass" value="eyemed.web.spring.tiles.CustomTilesJstlView "/><property name="prefix" value="/WEB-INF/jsp/defs/" /><property name="suffix" value=".jsp" /></bean><bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles. TilesConfigurer"><property name="factoryClass" value="org.apache.struts.tiles.xmlDefinition.I18nF actorySet"/><property name="definitions"><list><value>/WEB-INF/defs/tiles-defs.xml</value></list></property></bean>The flow I'm executing is:<view-state id="login" view="loginForm"><entry-actions><action bean="loginAction" method="setupForm"/></entry-actions><transition on="submit" to="landingPage"><action bean="loginAction" method="bindAndValidate"/></transition></view-state>WEB-INF/jsp/defs/loginForm.jsp looks like:<tiles:insert beanName="template" beanScope="application" ><tiles: put name="title" value="Place your Order" /><tiles: put name="body" value="/WEB-INF/jsp/fragments/loginForm.jspf" /></tiles:insert>Can anyone please help me? I'm at wit's end. (note: there are spaces showing in the code above that don't really exist in my source code. They are either CR/LF's or I had to add them to avoid having the edit convert them to smilies)TIA
_________________________________________________________________
Share life as it happens with the new Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007

Re: Spring + Tiles not working

Posted by Antonio Petrelli <an...@gmail.com>.
Todd, please repost, since your message is unreadable!!!

Antonio

2007/12/19, Todd Prickett <to...@hotmail.com>:
>
> I'm trying to wire tiles (from Struts 1.3 jars) into Spring 2.0.7 and
> Spring Web Flow 1.0.5.In doing so, I'm receiving the error: No Tiles
> definition found for name '/WEB-INF/jsp/defs/loginForm.jsp'My
> tiles-defs.xml looks like:<definition id="template" name="template"
> page="/WEB-INF/jsp/defs/template.jsp" controllerClass="
> org.apache.struts.tiles.actions.T ilesAction" ><put name="heading"
> value="/WEB-INF/jsp/fragments/heading.jspf"/><put name="header"
> value="/WEB-INF/jsp/fragments/header.jspf"/><put name="nav"
> value="/WEB-INF/jsp/fragments/nav.jspf"/><put name="content"
> value="/WEB-INF/jsp/fragments/empty.jspf"/><put name="footer"
> value="/WEB-INF/jsp/fragments/footer.jspf"/></definition>My
> servlet-config.xml looks like:<bean id="viewResolver" class="
> org.springframework.web.servlet.view.InternalResourceViewResolver"><property name="order" value="10"/><property
> name="requestContextAttribute" value="requestContext"/><property
> name="viewClass" value="eyemed.web.spring.tiles.CustomTilesJstlView"/><property name="prefix" value="/WEB-INF/jsp/defs/" /><property
> name="suffix" value=".jsp" /></bean><bean id="tilesConfigurer" class="
> org.springframework.web.servlet.view.tiles. TilesConfigurer"><property
> name="factoryClass" value="org.apache.struts.tiles.xmlDefinition.I18nFactorySet"/><property name="definitions"><list><value>/WEB-INF/defs/tiles-
> defs.xml</value></list></property></bean>The flow I'm executing
> is:<view-state id="login" view="loginForm"><entry-actions><action
> bean="loginAction" method="setupForm"/></entry-actions><transition
> on="submit" to="landingPage"><action bean="loginAction"
> method="bindAndValidate"/></transition></view-state>WEB-INF/jsp/defs/loginForm.jsp
> looks like:<tiles:insert beanName="template" beanScope="application"
> ><tiles: put name="title" value="Place your Order" /><tiles: put name="body"
> value="/WEB-INF/jsp/fragments/loginForm.jspf" /></tiles:insert>Can anyone
> please help me? I'm at wit's end. (note: there are spaces showing in the
> code above that don't really exist in my source code. They are either
> CR/LF's or I had to add them to avoid having the edit convert them to
> smilies)TIA
> _________________________________________________________________
> Share life as it happens with the new Windows Live.
>
> http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007