
请问 form 的action路径怎么填???求解。。。
info1中有表单,想把表单中信息传给com.servlet包中的Info1Servlet,那表单中action该怎么填呢?还有,如果表单信息有误,Info1Servle...
info1中有表单, 想把表单中信息传给 com.servlet包中的Info1Servlet ,那表单中action该怎么填呢? 还有,如果表单信息有误,Info1Servlet再跳转到info1.jsp ,那request.getRequestDispatcher("").forward(request, response);路径又该怎么填呢?? 求解。带包的路径我就更晕了。
展开
展开全部
<form id="sform" action="<%=request.getContextPath() %>/Info1Servlet?operate=1" method="post">
问好后面可以增加你要的参数,不要的话就去掉
<form id="sform" action="<%=request.getContextPath() %>/Info1Servlet" method="post">
info1Servlet:是你在web.xml文件配置的路径名
request.getRequestDispatcher("/工程名/student/info/info1.jsp ").forward(request, response);
问好后面可以增加你要的参数,不要的话就去掉
<form id="sform" action="<%=request.getContextPath() %>/Info1Servlet" method="post">
info1Servlet:是你在web.xml文件配置的路径名
request.getRequestDispatcher("/工程名/student/info/info1.jsp ").forward(request, response);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询