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

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -