如题?什么原因?怎么解决?谢谢
logon.jsp
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ page contentType="text/html; charset=GBK" %>
<html:html>
<head>
  <title>
    logon.jsp
  </title>
</head>
<link href="css/logon.css" type="text/css" rel="stylesheet">
<body BGCOLOR=#FFFFFF leftmargin="0" topmargin="0">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
      <td width=1><html:img width="19" height="105" src="images/login_01.gif"/></td>
      <td width=50% background="images/login_02.gif">&nbsp;</td>
      <td width=1><html:img width="113" height="105" src="images/login_03.gif"/></td>
      <td width=1><html:img width="116" height="105" src="images/login_04.gif"/></td>
      <td width=1><html:img width="107" height="105" src="images/login_05.gif"/></td>
      <td width=1><html:img width="105" height="105" src="images/login_06.gif"/></td>
      <td width=1><html:img width="113" height="105" src="images/login_07.gif"/></td>
      <td width=1><html:img width="113" height="105" src="images/login_08.gif"/></td>
      <td width=1><html:img width="68" height="105" src="images/login_09.gif"/></td>
      <td width=50% background="images/login_10.gif">&nbsp;</td>
      <td width=1><html:img width="15" height="105" src="images/login_11.gif"/></td>
    </tr>
  </table>
  <table width="306" border="0" cellspacing="0" cellpadding="0" align="center" class="9v">
    <tr>
      <td width="36"><html:img width="100" height="122" src="images/login_13.gif"/></td>
      <td width="178" background="images/login_14.gif" height=105 align="center" valign="top">
        <table width="109%" border="0" cellspacing="0" cellpadding="0" class="9v">
          <tr>
            <td height="88" valign="bottom" align=center>&nbsp;</td>
          </tr>
        </table>
      </td>
      <td width="186"><html:img width="122" height="122" src="images/login_15.gif"/></td>
    </tr>
    <tr>
      <td width="36" valign="top" height="44">
        <div align="right"><html:img width="100" height="72" src="images/login_17.gif"/></div>
      </td>
      <td width="178" align="center" valign="top" height="44">
        <table width="109%" border="0" class="9v" bgcolor="#FFFFFF" cellpadding="1" cellspacing="1" height="73">
          <html:form action="/logonAction.do" method="post">
            <html:hidden property="action" value="login"/>
            <html:errors />
            <html:messages id="message" message="true" header="success.header" footer="success.footer">
              <bean:write name="message"/>
            </html:messages>
            <tr>
              <td width="78"  height="7" bgcolor="#dddddd">
                <div align="right"><font color="#000000">手机:</font></div>
              </td>
              <td colspan="2" width="118" height="7" bgcolor="#dddddd">
                <div align="right">
                  <html:text property="mdn" styleClass="myinput" size="18" maxlength="18" />
                </div>
              </td>
            </tr>
            <tr>
              <td width="78" bgcolor="#eeeeee">
                <div align="right"><font color="#000000">密码:</font></div>
              </td>
              <td colspan="2" bgcolor="#eeeeee" width="118" height="7" >
                <div align="right">
                  <html:password property="password" styleClass="myinput" size="18" maxlength="18" />
                </div>
              </td>
            </tr>
            <tr bgcolor="#dddddd">
              <td height="2" colspan="3" align="right">
                <html:submit property="login" value="登陆" style="cursor: hand; height: 21px; width: 48px; border-style: none; padding: 0"  onclick="logonActionForm.action.value='login'"/>
                <html:submit property="getPassword" value="获取密码" style="cursor: hand; height: 21px; width: 48px; border-style: none; padding: 0"  onclick="logonActionForm.action.value='password'"/>
              </td>
            </tr>
          </html:form>
        </table>
      </td>
      <td width="186" valign="top" height="44"><html:img width="122" height="72" src="images/login_19.gif"/></td>
    </tr>
    <tr>
      <td width="36">&nbsp;</td>
      <td width="178" valign="top"><html:img width="194" height="84" src="images/login_21.gif"/></td>
      <td width="186" valign="top"><html:img width="122" height="84" src="images/login_22.gif"/></td>
    </tr>
  </table><br><br>
  <hr width="100%" noshade size="1" align="center">
    <table width="778" border="0" cellspacing="0" cellpadding="0" class="9v" align="center">
      <tr>
        <td width="463">
          <div align="right">All rights reserved.</div>
        </td>
        <td width="122">
          <div align="center"></div>
        </td>
        <td width="193">版权所有</td>
      </tr>
    </table>
  </body>
</html:html>

解决方案 »

  1.   

    struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
      <form-beans>
        <form-bean name="logonActionForm" type="com.poyer.dsm.action.LogonActionForm" />
        </form-beans>
      <global-forwards>
        <forward name="logon" path="/logon.jsp" />
        <forward name="success" path="/main.jsp" />
      </global-forwards>
      <action-mappings>
        <action forward="/index.jsp" path="/index" />
        <action name="logonActionForm" type="com.poyer.dsm.action.LogonAction" validate="true" input="/logon.jsp" scope="request" path="/logonAction" />  </action-mappings>
      <message-resources parameter="dsmApplictionResources" />
    </struts-config>
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
      <context-param>
        <param-name>HOST</param-name>
        <param-value>127.0.0.1</param-value>
      </context-param>
      <context-param>
        <param-name>JNDI_NAME</param-name>
        <param-value>jdbc/CommonDB</param-value>
      </context-param>
      <context-param>
        <param-name>LOG4J_CONF</param-name>
        <param-value>/WEB-INF/log4j.properties</param-value>
      </context-param>
      <context-param>
        <param-name>PORT</param-name>
        <param-value>11353</param-value>
      </context-param>
      <filter>
        <filter-name>charsetfilter</filter-name>
        <filter-class>com.poyer.dsm.filter.CharsetFilter</filter-class>
      </filter>
      <filter>
        <filter-name>securityfilter</filter-name>
        <filter-class>com.poyer.dsm.filter.SecurityFilter</filter-class>
        <init-param>
          <param-name>NONE_FILTER_PAGE_KEY</param-name>
          <param-value>logon.jsp,logonAction.do,index.jsp,index.do,logoff.jsp,logoffAction.do</param-value>
        </init-param>
      </filter>
      <filter-mapping>
        <filter-name>charsetfilter</filter-name>
        <url-pattern>/*</url-pattern>
      </filter-mapping>
      <filter-mapping>
        <filter-name>securityfilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
      </filter-mapping>
      <filter-mapping>
        <filter-name>securityfilter</filter-name>
        <url-pattern>*.do</url-pattern>
      </filter-mapping>
      <listener>
        <listener-class>com.poyer.dsm.context.DsmContextServlet</listener-class>
      </listener>
      <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
        <welcome-file>logon.jsp</welcome-file>
      </welcome-file-list>
      <taglib>
        <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
        <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
        <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
        <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
        <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
        <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
      </taglib>
    </web-app>
    server.xml
    <Context path="/a" docBase="F:\a\aa" debug="0" reloadable="true">
            <Valve className="org.apache.catalina.valves.AccessLogValve"
                     directory="logs"  prefix="localhost_access_log_dsm." suffix=".txt"
                     pattern="common"/>   
            <Logger className="org.apache.catalina.logger.FileLogger"
                     directory="logs"  prefix="localhost_log_dsm." suffix=".txt"
            timestamp="true"/>         
            <Resource name="jdbc/CommonDB" auth="Container" type="javax.sql.DataSource"/>        
              <ResourceParams name="jdbc/CommonDB">
                 <parameter>
                   <name>factory</name>
                   <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
                 </parameter>
                 <parameter>
                   <name>driverClassName</name>
                   <value>oracle.jdbc.driver.OracleDriver</value>
                 </parameter>
                 <parameter>
                   <name>url</name>
                   <value>jdbc:oracle:thin:@127.0.0.1:1521:aa</value>
                 </parameter>
                 <parameter>
                   <name>username</name>
                   <value>dsm</value>
                 </parameter>
                 <parameter>
                   <name>password</name>
                   <value>dsm</value>
                 </parameter>
                 <parameter>
                   <name>maxActive</name>
                   <value>50</value>
                 </parameter>
                 <parameter>
                   <name>maxIdle</name>
                   <value>3</value>
                 </parameter>
                 <parameter>
                   <name>maxWait</name>
                   <value>10000</value>
                 </parameter>
              </ResourceParams>
    </Context>