要确保能够从jsp准确提交到servlet应该使用eclipse生成jsp页面时定义的上下文变量:
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
form参数如下
<form name="form1" method="post" class="wmFm" action="<%=basePath%>servlet/userServlet">