JSP中request获取值

获取项目名:request.getContextPath();

获取IP:request.getServerName()

获取端口:request.getServerPort()

pageContext.setAttribute("contextPath", request.getContextPath());

JS获取值:'${contextPath}';

posted @ 2017-03-20 14:13  馳騁衿琾  阅读(3426)  评论(0编辑  收藏  举报