java - Importing .css into jsp document -


how link css file jsp file. jsp file in /web-inf/pages/connection.jsp css file in /web-inf/pages/style.css .

  1. don't put public+static resources in web-inf (web-inf protected resources, jsps)

  2. put public resources in webapp/static (pages not names things aren't pages)

  3. use jstl core url tag urls:

    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <link rel="stylesheet" href="<c:url value='/static/styles/style.css'/>">

  4. use lowercase urls (at least domain , path)

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -