views:

27

answers:

0

I was wondering if there is a possibility that I could use the JSTL function to import spring Views.

so something likes this:

<div id="contentHolder">
     <c:import url="/foo.do?bar" />
</div>

In the XML stands:

<!-- Viewresolver -->
<b:bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <b:property name="viewClass"><b:value>org.springframework.web.servlet.view.JstlView</b:value></b:property>
    <b:property name="prefix"><b:value>/WEB-INF/jsp/</b:value></b:property>
    <b:property name="suffix"><b:value>.jsp</b:value></b:property>
</b:bean> 

but with on this way I get the error:

 Circular view path [/WEB-INF/jsp/foo/index.jsp]: already dispatched to this view path within the same request [/BAR/WEB-INF/jsp/foo/index.jsp]. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.) 

the following manner also doesn't work: <jsp:include page= and <%@include file=

I guess this doesn't work because of the Viewresolver, but is there a way I can use it this way instead of using JavaScript by example.