Cannot access CSS files defined under WEB-INF from JSP

前端 未结 1 1951

I have created Struts2 application using Maven. In this application I have created two namespaces, first is tc and the second one is cmpui. From th

相关标签:
1条回答
  • 2021-01-15 13:42

    You can not access a resources that are under WEB-INF folder. Move your static resources to another place accessible by Struts2 (for example, web root). And use s:url tag to build the URL.

    <link rel="stylesheet" type="text/css" href="<s:url value='/css/default.css'/>">
    
    0 讨论(0)
提交回复
热议问题