问题描述:
在学习JavaWeb的过程中,使用JSP文件转至servlet文件的过程中,发现无论如何都无法打开文件
JSP文件代码
<%@page contentType="text/html;charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>欢迎页面!!!!!!!!!!!</title>
</head>
<body>
<a href="<%=request.getContextPath()%>/Test/list">进入程序</a>
</body>
</html>
servlet文件代码
@WebServlet({"/Test/list"})
public class Test extends HttpServlet {
@Override
protected void service(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
}
}
反复确定没有错误之后,但仍然出现以下情况的问题

问题解决:
后来经过各类尝试,感觉都不是关键问题,并且不知道所以然
最后发现是关于tomcat服务器的配置问题上面,由于没有给服务器具体的JRE导致无法识别程序代码,即服务器没办法使其完成编译等一系列操作

标签: # java

留言评论