JavaWeb项目,jsp中获取项目名称

<% 
 String WEB_APP = request.getContextPath();
 request.setAttribute("WEB_APP", WEB_APP);
%>

例如:

   你的地址为:http://localhost:8080/project_web/homePage/createExcel.do;

  生成excel相当于

  生成excel

你可能感兴趣的:(Java,Web项目相关问题及解决)