プロジェクトにDatatables springを実装しようとしています。
ファイルRoleController.java
内
@Controller
public class RoleController {
@RequestMapping(value = "/masterRole")
public ModelAndView about() {
RoleDAO dao = new RoleDAOImpl();
List<Role> list = dao.list();
ModelAndView model = new ModelAndView();
model.addObject("list",list);
model.setViewName("roleTile");
return model;
}
}
ファイルtiles.xml
内
<definition name="roleTile" extends="base.definition" >
<put-attribute name="title" value="DAM Role Master" />
<put-attribute name="body" value="/WEB-INF/pages/viewRole.jsp" />
<put-attribute name="menuselection" value="master" />
</definition>
ファイルviewRole.jsp
内
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="datatables" uri="http://github.com/dandelion/datatables" %>
<datatables:table id="roles" data="${list}" row="role" cssClass="table table-striped">
<datatables:column title="Id">
<c:out value="${role.roleId}"></c:out>
</datatables:column>
<datatables:column title="Role">
<c:out value="${role.role}"></c:out>
</datatables:column>
</datatables:table>
次のエラーが表示されます
com.github.dandelion.datatables.core.configuration.ConfigurationStore.getPrototype(ConfigurationStore.java:82) の java.lang.NullPointerException com.github.dandelion.datatables.core.configuration.TableConfiguration.getInstance(TableConfiguration.java:117) ) com.github.dandelion.datatables.core.html.HtmlTable.(HtmlTable.java:76) で com.github.dandelion.datatables.jsp.tag.TableTag.doStartTag(TableTag.java:91) で org.apache .jsp.WEB_002dINF.pages.viewRole_jsp._jspService(viewRole_jsp.java:78)、org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)、javax.servlet.http.HttpServlet.service(HttpServlet.java) :803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) で org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) で org.org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) で org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) で org.apache.catalina.core.ApplicationDispatcher .doInclude(ApplicationDispatcher.java:535) org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) org.apache.jasper.runtime.PageContextImpl の apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:638)。include(PageContextImpl.java:632) org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) org .apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) 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. org.apache.jsp.WEB_002dINF.pages.layout_jsp の apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299)。_jspx_meth_tiles_005finsertAttribute_005f4(layout_jsp.java:222) は org.apache.jsp.WEB_002dINF.pages.layout_jsp._jspService(layout_jsp.java:95) で.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java) :337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) で javax.servlet.http.HttpServlet.service(HttpServlet.java:803) で org.apache.catalina.core.ApplicationFilterChain. org.apache.catalina.core の internalDoFilter(ApplicationFilterChain.java:290)。org.apache.catalina.core の ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)。ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) org org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) の .apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) org.apache.tiles.request.servlet.ServletRequest の.doForward(ServletRequest.java:228) で org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) で org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) でorg.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:221) org .apache.tiles.renderer.DefinitionRenderer.render(DefinitionRenderer.java:59) at org.springframework.web.servlet.view.tiles3.TilesView.renderMergedOutputModel(TilesView.java:114) at org.springframework.web.servlet.view .AbstractView.render(AbstractView.java:267) で org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221) で org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005) でorg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952) at org.springframework.web.org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) で org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) で servlet.DispatcherServlet.doService(DispatcherServlet.java:870) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) で org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) で javax.servlet.http.HttpServlet.service(HttpServlet.java) :803) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) で org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) で org.springframework.security.web。 org.springframework.security.web.access の FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)。org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) の Intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:342) の org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) の org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) の org .springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication .org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) の AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter. java:146) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) で org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) で org.springframework .security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) at org.springframework.security.web. org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) の FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy. java:342) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) で org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) で.org.springframework.security.web.FilterChainProxy$VirtualFilterChain. org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57) の doFilter(FilterChainProxy.java:342) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) の org .springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy $VirtualFilterChain.org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) の doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) の org.springframework .web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java) :235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) で org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) で org.apache.catalina.core. org.apache の StandardContextValve.invoke(StandardContextValve.java:175)。org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) で org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) で org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:744)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) の invoke(StandardEngineValve.java:109) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) の org.apache .coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) で org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) で java.lang.Thread.run(Thread .java:744)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) の invoke(StandardEngineValve.java:109) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) の org.apache .coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) で org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) で java.lang.Thread.run(Thread .java:744)実行 (Thread.java:744)実行 (Thread.java:744)
私はデータテーブルが初めてです。私を助けてください。
休止状態とタイルを使用した Spring 4 との段階的な統合のための Datatbles へのリンクも招待されています。