这是完正的程序代码帮忙看看
package my_home;import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;public class news_add_get extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
String nesws_art=request.getParameter("art");
System.out.println(nesws_art); }
//Clean up resources
public void destroy() {
}
}服务器报错:StandardHost[localhost]: MAPPING configuration error for request URI
StandardHost[localhost]: Removing web application at context path /web_home*****************************
这是JSP里的完正的代码<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
update_index_news
</title>
<style type="text/css">
<!--
.style1 {
font-size: 18px;
font-family: "黑体";
}
.style4 {font-family: "黑体"; font-size: 16px; }
-->
</style>
</head>
<table width="768" border="2" align="center">
<form action="/my_home/news_add_get" >
<p> </p>
<p> </p>
<p> </p>
<tr align="center" valign="middle">
<td width="200" height="30"><span class="style4">新闻标题名</span></td>
<td valign="middle">
<input name="art" type="text" size="50">
最多14个字</td>
</tr>
<tr align="center" valign="middle">
<td height="30"><span class="style4">发表 作者</span></td>
<td valign="middle"> <input name="author_news" type="text" size="50">
最多10个字</td>
</tr>
<tr align="center" valign="middle">
<td height="30"><p class="style1">新</p>
<p class="style1">闻</p>
<p class="style1">内</p>
<p class="style1">容</p></td>
<td valign="middle"><textarea name="date_news" cols="55" rows="10" ></textarea></td>
</tr>
<tr align="center" valign="middle">
<td height="30"> </td>
<td valign="middle">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="取消"></td>
</tr>
</form>
</table>
</body>
</html>
****************************
这是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>
<display-name>web_home</display-name> <servlet>
<servlet-name>news_add_get</servlet-name>
<servlet-class>my_home.my_home.news_add_get</servlet-class>
</servlet> <servlet-mapping>
<servlet-name>news_add_get</servlet-name>
<url-pattern>/news_add_get</url-pattern>
</servlet-mapping>
</web-app>
请各位专家帮我会诊1111111111111
package my_home;import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;public class news_add_get extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
String nesws_art=request.getParameter("art");
System.out.println(nesws_art); }
//Clean up resources
public void destroy() {
}
}服务器报错:StandardHost[localhost]: MAPPING configuration error for request URI
StandardHost[localhost]: Removing web application at context path /web_home*****************************
这是JSP里的完正的代码<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
update_index_news
</title>
<style type="text/css">
<!--
.style1 {
font-size: 18px;
font-family: "黑体";
}
.style4 {font-family: "黑体"; font-size: 16px; }
-->
</style>
</head>
<table width="768" border="2" align="center">
<form action="/my_home/news_add_get" >
<p> </p>
<p> </p>
<p> </p>
<tr align="center" valign="middle">
<td width="200" height="30"><span class="style4">新闻标题名</span></td>
<td valign="middle">
<input name="art" type="text" size="50">
最多14个字</td>
</tr>
<tr align="center" valign="middle">
<td height="30"><span class="style4">发表 作者</span></td>
<td valign="middle"> <input name="author_news" type="text" size="50">
最多10个字</td>
</tr>
<tr align="center" valign="middle">
<td height="30"><p class="style1">新</p>
<p class="style1">闻</p>
<p class="style1">内</p>
<p class="style1">容</p></td>
<td valign="middle"><textarea name="date_news" cols="55" rows="10" ></textarea></td>
</tr>
<tr align="center" valign="middle">
<td height="30"> </td>
<td valign="middle">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="取消"></td>
</tr>
</form>
</table>
</body>
</html>
****************************
这是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>
<display-name>web_home</display-name> <servlet>
<servlet-name>news_add_get</servlet-name>
<servlet-class>my_home.my_home.news_add_get</servlet-class>
</servlet> <servlet-mapping>
<servlet-name>news_add_get</servlet-name>
<url-pattern>/news_add_get</url-pattern>
</servlet-mapping>
</web-app>
请各位专家帮我会诊1111111111111
解决方案 »
- 怎么样把graphics2D 类生成的图片放到文件中,如生成.png文件??
- 一个HIBERNATE的问题??
- 如何实现树形结构
- 问个搜索记录,出来相似度的问题
- jsp中taglib伪指令的使用问题,请高手苏速速指教(在线等待)
- JB9在进行REBUILD WebApp时,出现异常:"index.jsp": weblogic.utils.AssertionError: ***** ASSERTION FAILED ***** - with nested exce
- ResultSet can not re-read row data for column 3.这是什么原因?
- 解压tomcat后,98环境中,在BIN目录下运行startup,出现如下错误
- 高分求解?????一定给分
- SSI框架,刚才发现一个很神奇的问题,大伙进来看看
- serlet访问不了jsp为什么
- http请求的问题
这里只有一层,怎么到web.xml中就变成my_home.my_home.news_add_get???哪来两个my_home
<servlet>
<servlet-name>news_add_get</servlet-name>
<servlet-class>my_home.news_add_get</servlet-class>
</servlet>
这样路径也试过了。还是不行呀
还是就象你标题那样,用servlet访问jsp??你先去访问了servlet了?