java - Cannot access CSS files defined under WEB-INF from JSP -
java - Cannot access CSS files defined under WEB-INF from JSP -
i have created struts2 application using maven. in application have created 2 namespaces, first tc , sec 1 cmpui. jsp page, trying access .css files, giving me 404 error.
location of jsp page :
webapp\tc\layout\stylesheets.jsp location of css file :
web-inf\css\default.css code on jsp page is
<link rel="stylesheet" type="text/css" href="../web-inf/css/default.css"> any suggestion please.
you can not access resources under web-inf folder. move static resources place accessible struts2 (for example, web root). , utilize s:url tag build url.
<link rel="stylesheet" type="text/css" href="<s:url value='/css/default.css'/>"> java html css jsp struts2
Comments
Post a Comment