我正在使用带有通配符的spring 3 mvc Tiles,并且确实获取了参数的值。我已经定义了我的观点:
<definition name="recurso/*/*" extends="genericTemplate">
<put-attribute name="titulo" value="Recurso" />
<put-attribute name="body">
<definition extends="dosColumnasTemplate" >
<put-attribute name="izquierda" value="/WEB-INF/views/recursos/detalle/{1}.jsp" />
<put-attribute name="derecha" value="/WEB-INF/views/recursos/detalle/{2}.jsp" />
</definition>
</put-attribute>
</definition>
该方法调用处理程序:
@RequestMapping(value="/recurso/{id}", method = RequestMethod.GET)
public String printRecurso(@PathVariable(value = "id") Long id, ModelMap model)
{
model.addAttribute("active", "recursos");
return "recurso/campos/grupos";
}
我正在使用 TilesView:
<!-- Tiles View Url Based Resolver -->
<bean id="tilesViewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.tiles3.TilesView" />
</bean>
结果出现如下错误: El Servlet.service() for servlet jsp throw exception javax.servlet.ServletException: JSP File "/WEB-INF/views/recursos/detalle/jsp {1}." 未找到
javax.servlet.ServletException:JSP 文件“/WEB-INF/views/recursos/detalle/jsp {2}。” 未找到