How to link a web resource file from /main/resources in JSP?

后端 未结 2 1953
南旧
南旧 2021-01-05 08:38

I have the following structure in my java webapp

-- main
   -- java
   -- resources
      -- lib
         -- css
            -- style.css
   -- webapp
               


        
2条回答
  •  旧巷少年郎
    2021-01-05 09:07

    You need to put assets that are to be delivered to the client under your webapp directory. Otherwise you will need to write a servlet to deliver them.

    You can find all the nitty details in Chapter 10 of the Java Servlet 3.1 Specification.

提交回复
热议问题