Presentation of the image in JSP



  • Hello, I have an Internet store in the adminke, an addition of the product, images kept in the project catalogue. When I take this picture out, it won't be on the page. Annotations are:<mvc:resources mapping="/static/**" location="/static/" /> Bitch code:<img src="<c:url value="/static/productPic/${product.orgNamePic}"/>" alt="альтернативный текст">In the browser, display "alternative text," this image path is displayed in the browser: /sombraShop/static/productPic/b9ebb62354b87f5753ca501f90dfa45c.jpg



  • The images remain in the project catalogue ("static/productPic/disortion.png)

    I don't really know what you mean by "the project" in this case. As far as I'm concerned, Spring and the Servelts' specification don't know what it is and where to look.

    <mvc:resources mapping="/static/**"  location="/static/" />
    

    As I recall, location Looking for default in classpath-e. Is your "project catalogue" in classpath?

    I highly recommend that the following article on how the static content is distributed in Spring MVC: http://www.baeldung.com/spring-mvc-static-resources




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2