主题:[讨论]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">腐蚀速率�?</td>
<td align="center">请选择热处理状 <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">请选择腐蚀介质 <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>
下面是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">腐蚀速率�?</td>
<td align="center">请选择热处理状 <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">请选择腐蚀介质 <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>