Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

Spring MVC and Tiles 3 views resolve

$
0
0

Hello,

 

I am wondering if the Spring plugin is able to resolve Tiles 3 views? IDEA-94803 seems to indicate this is possible, but I can't get it to work, perhaps I am missing some configuration?

 

My project uses Spring MVC 3.2 and Tiles 3. Here's the relevant part of the Spring configuration:

 

 

     <context:annotation-config />     <context:component-scan base-package="com.blah.webapp"/>     <mvc:annotation-driven/>     <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">          <property name="viewClass" value="org.springframework.web.servlet.view.tiles3.TilesView"/>     </bean>          <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">          <property name="definitions">               <list>                    <value>/WEB-INF/tiles/general.xml</value>               </list>          </property>     </bean>

 

 

Tiles definitions in /WEB-INF/tiles/general.xml:

 

 

<tiles-definitions>     <definition name="base.definition" template="/WEB-INF/layout/layout.jsp">          ...     </definition>     <definition name="private/referentiel/listeReferentiels" extends="base.definition">          ...     </definition></tiles-definitions>

 

 

In my annotated controller which does a `return "private/referentiel/listeReferentiels"`, I get the following errors:

 

*         Cannot resolve directory 'private' / 'referentiel'

*         Cannot resolve file 'listeReferentiels'

 

It seems that IDEA considers that the view name is related to a path, but in fact it's not (we named definitions like this in case we want to remove Tiles, in which case we only have to add prefix and suffix tags to our viewResolver). Switching from slashes to dots does not work either ("private.referentiel.listeReferentiels").

 

Do I need a special plugin to support Tiles view resolution (as far as I know, the Struts 1.x plugin only supports Tiles 1)?

 

Thanks

Bastien


Viewing all articles
Browse latest Browse all 5661

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>