高手帮忙!
我要在jsp页面进行数据分页显示,用display标签怎么弄?我在session里塞个数组,然后到jsp页面显示,代码如下<%@ page contentType="text/html;charset=gb2312" import="java.util.*;"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display" %>
<html>
<body>
<display:table name="sessionScope.users" id="userBean" pagesize="2" cellspacing="0" cellpadding="0">
<display:column property="userName" title="姓名" sortable="true" group="1" />
<display:column property="password" title="学号" group="2" />
<display:column property="role" title="序号" />
</display:table>
</body>
</html>
显示了,可是总有下面这个警告,
WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
WARN: Please see http://www.slf4j.org/codes.html for an explanation.
log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.这是什么原因?
是不是缺少jar文件?需要哪些jar文件?

解决方案 »

  1.   

    WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked. 
    WARN: Please see http://www.slf4j.org/codes.html for an explanation. 
    log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources). 
    log4j:WARN Please initialize the log4j system properly. 和你做的一点关系也没有,这个Apache组织的一个开源项目log4j
    一个做日志的,你可能用了hibernate 吧,那里面需要为这个弄一个配置文件,Classes或者根目录下
    log4j.properties 就是这个文件,如果没有的话,就会出现你看到的那个提示。
      

  2.   

    这是警告信息,不会对你程序产生影响的,加个log4j的日志文件即可~!
      

  3.   

    谢谢各位的帮忙,那就不管他吗,那个log4j的日志文件要怎么弄?在下新手,望大家多帮忙了
      

  4.   

    log4j参考他的配置,以及使用方法
    http://www.cnblogs.com/eflylab/archive/2007/01/11/618001.html
      

  5.   

    在你项目src文件夹下新建一个文件(file)命名为:log4j.properties;然后在里面输入以下内容即可:
    log4j.rootLogger=info,A
    log4j.appender.A=org.apache.log4j.ConsoleAppender
    log4j.appender.A.layout=org.apache.log4j.SimpleLayout
      

  6.   

    我没src文件夹啊,只有WEB-INF啊
      

  7.   

    http://www.slf4j.org/ SLF4J warning or error messages and their meanings
    The method o.a.commons.logging.impl.SLF4FLogFactory#release was invoked.Given the structure of the commons-logging API, in particular as implemented by SLF4J, the o.a.commons.logging.impl.SLF4FLogFactory#release() method should never be called. However, depending on the deployment of commons-logging.jar files in your servlet container, release() method may be unexpectedly invoked by a copy of org.apache.commons.logging.LogFactory class shipping with commons-logging.jar.This is a relatively common occurrence with recent versions of Tomcat, especially if you place jcl-over-slf4j.jar in WEB-INF/lib directory of your web-application instead of $TOMCAT_HOME/common/lib, where $TOMCAT_HOME stands for the directory where Tomcat is installed. In order to fully benefit from the stability offered by jcl-over-slf4j.jar, we recommend that you place jcl-over-slf4j.jar in $TOMCAT_HOME/common/lib without placing a copy in your web-applications.Please also see bug #22.common log使用了SLF4J(是display标签使用的?), 但是stucts不知是不是使用了log4j