回 帖 发 新 帖 刷新版面

主题:[讨论]servlet不可用

The requested resource (/fushichuliservlet) is not available.

下面是xml的配置
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" 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">
    <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <init-param>
            <param-name>debug</param-name>
            <param-value>2</param-value>
        </init-param>
        <init-param>
            <param-name>detail</param-name>
            <param-value>2</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
        </servlet>
    <servlet>
        <servlet-name>fushichuliservlet</servlet-name>
        <servlet-class>com.boiler.www.fushichuliservlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>fushichuliservlet</servlet-name>
        <url-pattern>/fushichuliservlet</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>
            index.jsp
        </welcome-file>
    </welcome-file-list>
</web-app>
下面是提交表单
 <FORM name="search" action="/fushichuliservlet" method="POST"> 
              <table>
               <tr>
               <td width="20%" height="25" align="left">腐蚀速率&#65533;?</td>
               <td align="center">请选择热处理状&nbsp;<select  name="rechuli">
               <option >热处理状</option> 
         <%
               String sqlr="select distinct(rechulizhuangtai) from jibenlixuexingneng where cailiaoid='"+cailiaoid+"'";
              rs=DBcon.executeQuery(sqlr);
         
                while(rs.next())
                 { 
                 out.println("<option>"+rs.getString("rechulizhuangtai") +"</option>");
                          
                 }
                 %>
                 </select> </td>
                 <td align="center">请选择腐蚀介质&nbsp;<select  name="jiezhi">
                   <option >腐蚀介质</option>                  
          <%
                 String sqlj="select distinct(fushijiezhi) from junyunfushisulv where cailiaoid='"+cailiaoid+"'";
                  js=DBcon.executeQuery(sqlj);
                  while(js.next())
                  { 
                 out.println(" <option>"+js.getString("fushijiezhi") +"</option>");
                                        
                  }
                  %>
              </select> 
               <input type="hidden" value="select" name="action">
               <input type="submit" value="查询" />
               </td>
               </tr>
              </table>
</FORM>

回复列表 (共2个回复)

沙发

我觉得应该是那个action="/fushichuliservlet"写错,是不是多了一个斜杆,未考究,楼主试试看

板凳


你的servlet在哪个包中??如果需要跳出,就要../(servlet)

我来回复

您尚未登录,请登录后再回复。点此登录或注册