各位大哥大姐好,小弟刚开始学习web开发不久,遇到了不少问题,现在做的是个科研经费管理系统,一个小系统吧,我是用以前别人做好的另一个系统修改的,加入了一些我们系统需要的模块后无法现在发布后ie中输入http://localhost:8080/babo/web/login.faces后现在能够看到登陆页面,输入账号密码却不能进入index页面,只是闪了一下又还是在login页面,数据库,受管bean那些都是配好了的吧,我也试过换个tomcat高点的版本,但是还是不能进去,我快要崩溃了,弄了一个多星期,自己研究貌似没发现哪里有问题呀,郁闷死了!更离奇的是我同事的笔记本上的同一个工程,同样的数据库他的就能到index页面,而我是从他的笔记本上导过来的工程,为什么我的就不行呢?我在公司电脑和自己的笔记本上都试过了,同样的问题,不能跳转。难道是我哪里还没有配置对?大家帮帮我吧,这是我进公司做的第一个项目啊,无法跳转后面的很多事情都不能做不好调试了,我的前途啊...先谢谢大家了哈!小弟刚来,没多少分,谁能帮我解决这个问题我分都给你们了哈!如果有可以的朋友可以加我qq,我把项目发给你们帮我看看行吗?我q:565576540,注明csdn就行了哈。对了,如果有什么配置文件需要看给我说我再贴出来哈,现在还是菜鸟,对发帖都不熟悉,呵呵

解决方案 »

  1.   

    2010-4-5 15:58:27 org.apache.catalina.core.AprLifecycleListener init
    信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_10\bin;J:\tomcat\bin
    2010-4-5 15:58:28 org.apache.coyote.http11.Http11Protocol init
    信息: Initializing Coyote HTTP/1.1 on http-8080
    2010-4-5 15:58:28 org.apache.catalina.startup.Catalina load
    信息: Initialization processed in 1860 ms
    2010-4-5 15:58:28 org.apache.catalina.core.StandardService start
    信息: Starting service Catalina
    2010-4-5 15:58:28 org.apache.catalina.core.StandardEngine start
    信息: Starting Servlet Engine: Apache Tomcat/6.0.26
    2010-4-5 15:58:28 org.apache.catalina.startup.HostConfig deployDescriptor
    信息: Deploying configuration descriptor host-manager.xml
    2010-4-5 15:58:29 org.apache.catalina.startup.HostConfig deployDescriptor
    信息: Deploying configuration descriptor manager.xml
    2010-4-5 15:58:29 org.apache.catalina.startup.HostConfig deployDirectory
    信息: Deploying web application directory babo
    2010-4-5 15:58:36 org.apache.catalina.core.StandardContext addApplicationListener
    信息: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
    log4j:WARN No appenders could be found for logger (org.apache.myfaces.webapp.StartupServletContextListener).
    log4j:WARN Please initialize the log4j system properly.
    2010-4-5 15:58:40 org.apache.catalina.core.ApplicationContext log
    信息: Loading Spring root WebApplicationContext
    2010-4-5 15:58:53 org.apache.catalina.startup.HostConfig deployDirectory
    信息: Deploying web application directory docs
    2010-4-5 15:58:53 org.apache.catalina.startup.HostConfig deployDirectory
    信息: Deploying web application directory examples
    2010-4-5 15:58:54 org.apache.catalina.core.ApplicationContext log
    信息: ContextListener: contextInitialized()
    2010-4-5 15:58:54 org.apache.catalina.core.ApplicationContext log
    信息: SessionListener: contextInitialized()
    2010-4-5 15:58:54 org.apache.catalina.startup.HostConfig deployDirectory
    信息: Deploying web application directory ROOT
    2010-4-5 15:58:54 org.apache.coyote.http11.Http11Protocol start
    信息: Starting Coyote HTTP/1.1 on http-8080
    2010-4-5 15:58:54 org.apache.jk.common.ChannelSocket init
    信息: JK: ajp13 listening on /0.0.0.0:8009
    2010-4-5 15:58:54 org.apache.jk.server.JkMain start
    信息: Jk running ID=0 time=0/63  config哎=null
    2010-4-5 15:58:54 org.apache.catalina.startup.Catalina start
    信息: Server startup in 26589 ms
    这是控制台的,没报错啊。
      

  2.   

    下面这是tomcat的日志文件,貌似也没问题嘛:
    2010-04-05 16:31:11 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    2010-04-05 16:31:17 StandardContext[/babo]Loading Spring root WebApplicationContext
    2010-04-05 16:31:28 StandardContext[/jsp-examples]ContextListener: contextInitialized()
    2010-04-05 16:31:28 StandardContext[/jsp-examples]SessionListener: contextInitialized()
    2010-04-05 16:31:28 StandardContext[/servlets-examples]ContextListener: contextInitialized()
    2010-04-05 16:31:28 StandardContext[/servlets-examples]SessionListener: contextInitialized()
    2010-04-05 16:33:00 StandardContext[/babo]No state saving method defined, assuming default server state saving
      

  3.   

    然后这是我login.jsp
    <%@ page contentType="text/html; charset=gb2312" language="java" errorPage=""%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta  http-equiv='Expires'  content='-10'>  
    <meta  http-equiv='Pragma'    content='No-cache'>  
    <meta  http-equiv='Cache-Control',  'private'>  
    <meta  http-equiv="Content-Type" content="text/html; charset=gb2312">
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <object id=hh2 classid=clsidDB880A6-D8FF-11CF-9377-00AA003B7A11>
       <param name=Command value=Maximize>
       </object>
    <title>科研管理系统登录</title>
    <script language="javascript" src="../js/rightKeyControll.js"></script>
    <SCRIPT language=javaScript type="text/JavaScript">
    <!--
    function focusOn()
    {
        var f = document.forms['loginForm'];
        f.elements['loginForm:loginName'].focus();
         if(f.elements['loginForm:_id1'].value==''){
         f.elements['loginForm:loginName'].focus();
         }
    else if(f.elements['loginForm:_id1'].value=='用户名不存在,请重输!'){
             f.elements['loginForm:loginName'].focus();
    }else if(f.elements['loginForm:_id1'].value=='密码错误,请重新输入!'){
    f.elements['loginForm:password'].focus();
    }
    }
    -->
    </SCRIPT>
    </head>
    <body bgcolor="#B7DCF6" leftmargin="200" topmargin="150" onLoad="javascript:focusOn();hh2.click();">
    <f:view>
        <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="login_bg">
      <tr>
        <td><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td colspan="3" align="center"><img src="../images/login_toppic.jpg" alt="" width="1000" height="230" /></td>
          </tr>
          <tr>
            <td width="336" align="center"><img src="../images/login_leftpic.jpg" alt="" width="336" height="204" /></td>
            <h:form id="loginForm">
            <td width="300" align="center" valign="top" background="../images/login_centerpic.jpg" >
             
            <table width="80%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td colspan="2" align="center">&nbsp;</td>
              </tr>
              <tr>
                <td height="40" align="right" class="logintext">用户名:</td>
                <td height="40" align="center" class="logininput"><h:inputText value="#{loginBean.user.name}" id="loginName" size="20"/></td>
              </tr>
              <tr>
                <td height="40" align="right" class="logintext">密码:</td>
                <td height="40" align="center" class="logininput"><h:inputSecret value="#{loginBean.user.password}" id="password" size="20"/></td>
              </tr>
              <tr>
                <td height="50" colspan="2" align="center" valign="bottom">
                
                    <h:commandButton value="Login" action="#{loginBean.loginAction}" image="../images/login_login.gif" />
       
                </td>
              </tr>
            </table>
            </td>
            </h:form>
            <td width="364" align="center"><img src="../images/login_rightpic.jpg" alt="" width="364" height="204" /></td>
          </tr>
          <tr>
            <td colspan="3" align="center"><img src="../images/login_buttompic.jpg" alt="" width="1000" height="166" /></td>
          </tr>
           <tr>
       <td colspan="3" align="center" valign="middle">
      <h:inputHidden value="#{loginBean.messages}" rendered="true" required="false" />
      <h:outputLabel id="message" value="#{loginBean.messages}" style="color:#FD02E2;font-family: SimSun; font-size: 12px" />
       </td>
          </tr>
        </table></td>
      </tr>
    </table>
    </f:view>
    </body>
    </html>
      

  4.   

    我也遇到这个问题 我的在tomcat 6.0.20 没问题  在6.0.26不能跳转
    用的框架也是jsf