`

jsp页面中引入当前项目路径

    博客分类:
  • jsp
 
阅读更多

 

方法:

1:${pageContext.request.contextPath}   jstl
2:或者<%=request.getContextPath()%>

 

 

<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>

<link type="text/css" rel="stylesheet"
    href="${pageContext.request.contextPath}/public/styles/mainweb.css" />

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics