今天下午,jsp文件报错
删除html顶部的代码
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
将代码剪切到<body>中
<form action="${pageContext.request.contextPath}/login" method="get">
用户名:<input type="text" name="username"><br>
密码:<input type="password" name="password">
<input type="submit">
</form>
<%@ page contentType="text/html; charset=UTF-8"%>
</body>
</html>
idea中下面的代码尽量要通过提示+enter的方式敲出来,不然会有500报错,原因我没有找到!
两个小时才搞明白,唉
<form action="${pageContext.request.contextPath}/login" method="get">