jsp里面from表单action设置servlet的路径问题
jsp页面<formaction="/SendMessageServlet"method=post>web.xml<servlet><servlet-name>SendM...
jsp页面<form action="/SendMessageServlet" method=post >web.xml<servlet>
<servlet-name>SendMessageServlet</servlet-name>
<servlet-class>accp.servlet.SendMessageServlet</servlet-class>
</servlet> <servlet-mapping>
<servlet-name>SendMessageServlet</servlet-name>
<url-pattern>/servlet/SendMessageServlet</url-pattern>
</servlet-mapping>哪有问题啊,我每次提交的时候都是404错误找不到 SendMessageServlet 展开
<servlet-name>SendMessageServlet</servlet-name>
<servlet-class>accp.servlet.SendMessageServlet</servlet-class>
</servlet> <servlet-mapping>
<servlet-name>SendMessageServlet</servlet-name>
<url-pattern>/servlet/SendMessageServlet</url-pattern>
</servlet-mapping>哪有问题啊,我每次提交的时候都是404错误找不到 SendMessageServlet 展开
2013-06-24
展开全部
其他不用动,将web.xml里的 <url-pattern>/servlet/SendMessageServlet</url-pattern>改成<url-pattern>/SendMessageServlet</url-pattern>就是删除前面的/servlet
2013-06-24
展开全部
/servlet/SendMessageServlet
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询