日期:2014-05-18  浏览次数:20737 次

Servlet开发求助
在下写了个Servlet,用HTML提交,但是运行后出现错误,请各位指教,万分感激:
type:   Status   report
message:   /ServletModule/ServletModule/customerregistration
description:   The   requested   resource   (/ServletModule/ServletModule/customerregistration)   is   not   available.

我的XML描述是:
<?xml   version= "1.0 "   encoding= "UTF-8 "?>
<web-app   xmlns= "http://java.sun.com/xml/ns/j2ee "   xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance "   xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd "   version= "2.4 ">
    <display-name> ServletModule </display-name>
    <servlet>
        <servlet-name> customerregistration </servlet-name>
        <servlet-class> example_lg_1.CustomerRegistration </servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name> customerregistration </servlet-name>
        <url-pattern> /customerregistration </url-pattern>
    </servlet-mapping>
</web-app>

HTML文件:
<html>
<head>
<meta   content= "text/html;charset=gb2312 "   />
<title> 用户注册表 </title>
</head>
<body>
<form   action= "ServletModule/customerregistration "method= "post ">
<table   width= "100% "   border= "0 "   bgcolor= "center ">
    <tr   align= "center "   valign= "top ">
        <td   colspan= "2 ">
          <h1>
            <em>
              <strong> 用户注册表 </strong>
            </em>
          </h1>
        </td>
    </tr>
    <tr>
      <td>
        <span>
          <strong> 用户   ID: </strong>
        </span>
      </td>
      <td>
        <input   name= "txtuserid "   type= "text "   id= "txtuserid "   size= "45 "   maxlength= "35 ">
      </td>
    </tr>
    <tr>
      <td>
        <span>
          <strong> 密码: </strong>
        </span>
      </td>
      <td>
        <input   name= "txtpassword "   type= "password "   id= "txtpassword "   size= "12 "
        maxlength= "10 ">
      </td>
    </tr>