慕姐8265434
<servlet-mapping><servlet-name>action</servlet-name><url-pattern>/action</url-pattern></servlet-mapping>表单中的action的写法:/action;和<url-pattern>标签中的值一致,myeclipse中生成的JSP页面开头都有String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";<head>标签内有<base href="<%=basePath%>">如果<head>中没有上述内容,action写成<%=basePath%>/action最保险