我正在使用java servlet来获取表单值并显示它。我已完成其他人针对此问题发布的所有更改。但我仍然得到这个错误。
这是我的servlet:
@WebServlet("/UpdateDetails")
public class updateDetails extends HttpServlet
{
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
<br/>
String name=request.getParameter("appName");<br/>
System.out.println(name);
PrintWriter writer = response.getWriter();
// build HTML code
String htmlRespone = "<html>";
htmlRespone += "<h2>Application: " + name + "<br/>";
htmlRespone += "</html>";
// return response
writer.println(htmlRespone);
}
}
HTML
<form name="edit" action="UpdateDetails">