1.idea导入tomat 旧项目(需要的配置)
projectstructure -->project->lib(tomcat/jsp/servlet)
facets->添加->web-->选中模块
arifacts->添加 moudle
2.转发不加项目名,重定向加项目名(servlet中)
转发重定向都不需要加项目名(springmvc中:自动为重定向添加项目名)
转发: request.getRequestDispatcher("/detail.jsp").forward(request,response);
重定向: response.sendRedirect(request.getContextPath()+"/list"
3.前端页面中的请求路径中的---相对路径
"/settings/qx/user/login.do"----地址栏上的路径-->http://127.0.0.1:8080/settings/qx/user/login.do
"settings/qx/user/login.do"------------->http://127.0.0.1:8080/crm/settings/qx/user/login.do
加项目名-->/crm/settings/qx/user/login.do(不灵活,更改项目名之后需要重新修改代码中的地址)
解决方案:
现在<base href="${pageContext.request.getContextPath()}+"/"">
然后写路径的时候全写相对路径
4.junit无法正常执行,转圈
mysql版本5+运行不了,8.0.28的才行