Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache busting does not work when context path is different from / [SPR-12459] #17064

Closed
spring-projects-issues opened this issue Nov 21, 2014 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Hans Desmet opened SPR-12459 and commented

When the context path of an application is different from /,
the <c:url tag in JSP does not add the version (that is provided by the cache busting infrastructure of Spring 4.1) tot the URL of a static resource.
When you deploy my example webapp (see https://github.com/desmethans/cachebusting.git) on a local tomcat with / as the context path (the webapp runs then on localhost:8080)
the JSP tag <c:url value="/styles/default.css"/> produces correct HTML, with a version in the url:
/styles/default-e89bda525823a25214337af0003918c2.css

When you deploy the same webapp on a local tomcat with testing as the context path (the webapp runs then on localhost:8080/testing)
the JSP tag <c:url value="/styles/default.css"/> produces wrong HTML, without a version in the url:
/cachebusting/styles/default.css


Affects: 4.1.2

Referenced from: commits b3bfa95

@spring-projects-issues
Copy link
Collaborator Author

Brian Clozel commented

Thanks Hans Desmet, this has been resolved and will be shipped in 4.1.3.

In the meantime, you should be able to test it in your application in a few minutes:

  • using version 4.1.3.BUILD-SNAPSHOT
  • from the snapshot repository http://repo.spring.io/libs-snapshot/

@spring-projects-issues
Copy link
Collaborator Author

Hans Desmet commented

Works with 4.1.3.BUILD-SNAPSHOT, thanks !

@spring-projects-issues spring-projects-issues added type: bug A general bug in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.1.3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants