开发者

Possibility to use <c:import> with spring views

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.


you can try full path of the url

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜