如何解决异常'javax.el.BeanELResolver $ BeanProperties.get:245'

问题描述 投票:-2回答:2

我遇到此异常:

[[ERROR] SRVE0777E:应用程序类引发异常'javax.el.BeanELResolver $ BeanProperties.get:245'javax.el.PropertyNotFoundException:在类型上找不到属性“索引”java.lang.String

我见过很多解决方案,但都具有相同的异常,但是在异常在类型java.lang.String上找不到属性'index'的情况下,我找不到这个特定的('index'),但是我知道这也是String和其他字符串一样,但是找不到解决方案。

我已经删除了所有样板代码,只是为了检查Controller是否渲染了jsp页面,但是以某种方式甚至删除了它仍然给出所提到的异常的所有代码。

我在网上很少找到答案,其中字符串是POJO的一部分,而问题与POJO有关,但在我的情况下,POJO中没有定义变量'index'。

任何人都可以让我知道我做错了什么。

异常堆栈跟踪

[ERROR   ] SRVE0777E: Exception thrown by application class 'javax.el.BeanELResolver$BeanProperties.get:245'
javax.el.PropertyNotFoundException: Property 'index' not found on type java.lang.String
    at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:245)
    at javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:222)
    at javax.el.BeanELResolver.property(BeanELResolver.java:332)
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:96)
    at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:110)
    at [internal classes]
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_when_2(_foundation_2D_header_2D_ne.java:520)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_choose_1(_foundation_2D_header_2D_ne.java:595)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_forEach_2(_foundation_2D_header_2D_ne.java:639)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_forEach_1(_foundation_2D_header_2D_ne.java:696)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspService(_foundation_2D_header_2D_ne.java:148)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:101)
    at [internal classes]
    at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123)
    at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47)
    at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47)
    at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259)
    at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188)
    at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132)
    at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299)
    at com.ibm._jsp._foundation_2D_baseLayout._jspx_meth_tiles_insertAttribute_1(_foundation_2D_baseLayout.java:608)
    at com.ibm._jsp._foundation_2D_baseLayout._jspService(_foundation_2D_baseLayout.java:173)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:101)
    at [internal classes]
    at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265)
    at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228)
    at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57)
    at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:221)
    at org.apache.tiles.renderer.DefinitionRenderer.render(DefinitionRenderer.java:59)
    at org.springframework.web.servlet.view.tiles3.TilesView.renderMergedOutputModel(TilesView.java:132)
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1257)
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
    at [internal classes]
    at hcl.common.filter.FilterToGetTimeOut.doFilterInternal(FilterToGetTimeOut.java:36)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
    at [internal classes]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:124)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
    at [internal classes]

[ERROR   ] SRVE0777E: Exception thrown by application class 'javax.el.BeanELResolver$BeanProperties.get:245'
javax.el.PropertyNotFoundException: Property 'index' not found on type java.lang.String
    at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:245)
    at javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:222)
    at javax.el.BeanELResolver.property(BeanELResolver.java:332)
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:96)
    at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:110)
    at [internal classes]
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_when_2(_foundation_2D_header_2D_ne.java:520)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_choose_1(_foundation_2D_header_2D_ne.java:595)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_forEach_2(_foundation_2D_header_2D_ne.java:639)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_forEach_1(_foundation_2D_header_2D_ne.java:696)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspService(_foundation_2D_header_2D_ne.java:148)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:101)
    at [internal classes]
    at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123)
    at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47)
    at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47)
    at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259)
    at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188)
    at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132)
    at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299)
    at com.ibm._jsp._foundation_2D_baseLayout._jspx_meth_tiles_insertAttribute_1(_foundation_2D_baseLayout.java:608)
    at com.ibm._jsp._foundation_2D_baseLayout._jspService(_foundation_2D_baseLayout.java:173)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:101)
    at [internal classes]
    at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265)
    at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228)
    at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57)
    at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:221)
    at org.apache.tiles.renderer.DefinitionRenderer.render(DefinitionRenderer.java:59)
    at org.springframework.web.servlet.view.tiles3.TilesView.renderMergedOutputModel(TilesView.java:132)
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1257)
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
    at [internal classes]
    at hcl.common.filter.FilterToGetTimeOut.doFilterInternal(FilterToGetTimeOut.java:36)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
    at [internal classes]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:124)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
    at [internal classes]

[ERROR   ] SRVE0777E: Exception thrown by application class 'org.springframework.web.servlet.FrameworkServlet.processRequest:982'
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is javax.el.PropertyNotFoundException: Property 'index' not found on type java.lang.String
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
    at [internal classes]
    at hcl.common.filter.FilterToGetTimeOut.doFilterInternal(FilterToGetTimeOut.java:36)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
    at [internal classes]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:124)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
    at [internal classes]
Caused by: javax.el.PropertyNotFoundException: Property 'index' not found on type java.lang.String
    at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:245)
    at javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:222)
    at javax.el.BeanELResolver.property(BeanELResolver.java:332)
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:96)
    at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:110)
    at [internal classes]
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_when_2(_foundation_2D_header_2D_ne.java:520)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_choose_1(_foundation_2D_header_2D_ne.java:595)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_forEach_2(_foundation_2D_header_2D_ne.java:639)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspx_meth_c_forEach_1(_foundation_2D_header_2D_ne.java:696)
    at com.ibm._jsp._foundation_2D_header_2D_ne._jspService(_foundation_2D_header_2D_ne.java:148)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:101)
    at [internal classes]
    at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123)
    at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47)
    at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47)
    at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259)
    at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188)
    at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132)
    at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299)
    at com.ibm._jsp._foundation_2D_baseLayout._jspx_meth_tiles_insertAttribute_1(_foundation_2D_baseLayout.java:608)
    at com.ibm._jsp._foundation_2D_baseLayout._jspService(_foundation_2D_baseLayout.java:173)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:101)
    at [internal classes]
    at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265)
    at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228)
    at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57)
    at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:221)
    at org.apache.tiles.renderer.DefinitionRenderer.render(DefinitionRenderer.java:59)
    at org.springframework.web.servlet.view.tiles3.TilesView.renderMergedOutputModel(TilesView.java:132)
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1257)
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    ... 45 more

Controller

@Controller
public class NormalizationJobHistoryController {

    @RequestMapping(value = "/normalizationjobhistory")
    public ModelAndView getViewHistory(ModelAndView model, HttpServletRequest req, HttpServletResponse res,
            HttpSession session) throws Exception {

        model.setViewName("viewNormalizationJobHistoryList");

        return model;
    }
}  

[Jsp页面

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="tg" tagdir="/WEB-INF/tags"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<!-- Main Body Section Start -->
<main class="container padContnr">
<div class="row">
    <div class="col-md-12">
        <h1>Processing History</h1>
    </div>
</div>
</main>

tiles.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tiles-definitions PUBLIC  "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"  "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">  

<tiles-definitions>  

   <!-- Base Definition -->
   <definition name="base-definition-ne"
       template="/WEB-INF/views/layout/foundation-baseLayout.jsp">  
       <put-attribute name="title" value="" />  
       <put-attribute name="header" value="/WEB-INF/views/layout/header-ne.jsp" /> 
        <put-attribute name="foundation-header" value="/WEB-INF/views/foundation/foundation-header-ne.jsp" />          
       <put-attribute name="body" value="" />  
       <put-attribute name="footer" value="/WEB-INF/views/layout/footerNe.jsp" />
       <put-attribute name="appliName" value="ne" />
   </definition>  

      <!-- Configuration job listing Page -->
   <definition name="viewNormalizationJobHistoryList" extends="base-definition-ne">  
       <put-attribute name="title" value="viewNormalizationJobHistoryList" />  
       <put-attribute name="body" value="/WEB-INF/views/administration/viewNormalizationJobHistoryList.jsp" />       
   </definition>

   </tiles-definitions>

Model Class

public class Configuration {
    private int id;

    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
}

我得到此异常:[错误] SRVE0777E:应用程序类'javax.el.BeanELResolver $ BeanProperties.get:245'javax.el.PropertyNotFoundException:属性'index'引发的异常:]'

java jsp spring-mvc jstl
2个回答
0
投票

因为您在代码中使用了自定义标记和许多其他的jsp。因此很难弄清楚这个样本。检查所有被调用的jsp。您可以发布标签类代码吗?


-2
投票

问题已解决

© www.soinside.com 2019 - 2024. All rights reserved.