akram
akram

Reputation: 517

Petclinic Spring example returns "Failed to load resource"

I just downloaded the petclinic application from this site: https://src.springframework.org/svn/spring-samples/.

I imported it in Eclipse, the server is Tomcat 7, the application is working but the static data, like images and scripts are not:

Failed to load resource: the server responded with a status of 404 (Not Found) petclinic/static/styles/petclinic.css

Failed to load resource: the server responded with a status of 404 (Not Found) /petclinic/static/images/pets.png

Failed to load resource: the server responded with a status of 404 (Not Found) /petclinic/static/images/springsource-logo.png

Upvotes: 1

Views: 1124

Answers (1)

axtavt
axtavt

Reputation: 242706

Petclinic sample is a bit outdated and has a known issue on Tomcat, see SPR-7893.

If you want to make it work on Tomcat nonetheless, you need to create a folder named src/main/webapp/static and move html, images and styles folders there.

Upvotes: 2

Related Questions