getServletContext().getRealPath和${pageContext.request.contextPath}
作者:互联网
String path =
getServletContext().getRealPath("/WEB-INF/new_words.txt");
输出:pathD:\IdeaProjects\itcaststore\target\itcaststore-1.0-SNAPSHOT\WEB-INF\new_words.txt
${pageContext.request.contextPath}:定位webapp文件夹
标签:WEB,itcaststore,contextPath,request,getServletContext,getRealPath,new,txt 来源: https://blog.csdn.net/qq_31255557/article/details/115493478