Spring MVC属性无法识别

时间:2014-10-15 14:30:33

标签: java jsp spring-mvc el

我在Spring MVC中遇到了一个属性问题。

在jsp文件中我得到了这个:

<form:form  class="main-section" commandName="assistanceForm" name="assistanceForm" method="post" enctype="multipart/form-data" action="${enregistrerAssistanceUrl}">
        <form:hidden path="popupAssistanceOuverte"/> 
        <form:hidden path="codeAgence"/>
        <form:hidden path="idClient" value="${idClient}"/>
</form:form>

当我访问网页时,我收到了此错误:

......at line 18: This attribute is not recognized.
    <%@include file="assistance.jsp"%>

第18行是这一行:

<form:hidden path="idClient" value="${idClient}"/>

如果我用这个替换这条线就没有错误:

<form:hidden path="idClient">

但我需要价值。

idClient的值在ModelAndView对象中(名为pModel),在控制器中添加如下:

pModel.addAttribute("idClient", "");

我真的无法弄清楚发生了什么!

任何想法?

这是堆栈跟踪:

这是:####&lt; 2014-10-15.15-55-14-232&gt; &lt; [ACTIVE] ExecuteThread:&#39; 21&#39; for queue:&#39; weblogic.kernel.Default(自我调整)&#39;&gt; &LT;&GT; &LT;&GT; &LT; 24448466f5d9c1c6:76226577:14913e992e8:-7ffd-000000000000009b&GT; &LT; 1413381314232&GT; &lt; [ServletContext @ 31289880 [app:FOAGAN_DEV_C0C_2_foagan-ear module:foagan path:null spec-version:3.0]] ServletException的根本原因。 org.apache.tiles.impl.CannotRenderException:JSPException包括path&#39; /WEB-INF/jsp/layout/headerFOA.jsp'。     在org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:692)     在org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:644)     在org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:628)     在org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:322)     在org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:125)     在org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263)     在org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1181)     在org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)     在org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)     在org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)     在org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:779)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:731)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:845)     在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:242)     在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:216)     在weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)     在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)     在weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)     在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)     在org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:63)     在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)     在weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)     在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)     at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.wrapRun(WebAppServletContext.java:3288)     at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.run(WebAppServletContext.java:3254)     在weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)     在weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)     在weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)     在weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)     在weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2091)     在weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)     在weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)     在weblogic.servlet.provider.ContainerSupportProviderImpl $ WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)     在weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)     在weblogic.work.ExecuteThread.run(ExecuteThread.java:221) 引发者:org.apache.tiles.util.TilesIOException:JSPException包括path&#39; /WEB-INF/jsp/layout/headerFOA.jsp'。     at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:241)     at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:105)     at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96)     at org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44)     在org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)     at org.apache.tiles.renderer.impl.ChainedDelegateAttributeRenderer.write(ChainedDelegateAttributeRenderer.java:76)     在org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)     在org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670)     在org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:336)     at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:210)     at org.apache.tiles.template.InsertAttributeModel.end(InsertAttributeModel.java:126)     at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:311)     在jsp_servlet._web_45_inf._jsp._layout .__ templatefoa._jspService(__ templatefoa.java:207)     在weblogic.servlet.jsp.JspBase.service(JspBase.java:34)     在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:242)     在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:216)     在weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)     在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)     at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:453)     在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:364)     在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)     在weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:564)     在weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:263)     在org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:241)     在org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:222)     at org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44)     在org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)     在org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670)     在org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:690)     在org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:644)     在org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:627)     在org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321)     在org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:124)     在org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)     在org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)     在org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)     在org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)     在org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)     在org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:731)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:844)     在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:242)     在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:216)     在weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)     在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)     在weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)     在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)     在org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)     在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)     在weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)     在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)     at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.wrapRun(WebAppServletContext.java:3288)     at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.run(WebAppServletContext.java:3254)     在weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)     在weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)     在weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)     在weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)     在weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)     在weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)     在weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)     在weblogic.servlet.provider.ContainerSupportProviderImpl $ WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)     在weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)     在weblogic.work.ExecuteThread.run(ExecuteThread.java:221) 引发者:weblogic.servlet.jsp.CompilationException:无法编译JSP /WEB-INF/jsp/layout/headerFOA.jsp headerFOA.jsp:92:19:&#34; E:\ oracle \ wlserver_12c \ domaines \ dfog1 \ servers \ mdganxfog10 \ tmp_WL_user \ FOAGAN_DEV_C0C_2_foagan-ear \ 62vw8g \ war \ WEB-INF \ jsp \ layout \ aid.jsp& #34;在第18行:无法识别此属性。         &lt;%@ include file =&#34; assistance.jsp&#34;%&gt;

0 个答案:

没有答案