You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm migrating an application from spring (a WAR) to spring-boot. It uses GWT which uses a servlet that depends on getServletContext().getResourseAsStream() method works as expected.
I've make a reproducible project at reproissue.zip
Serving static resources from the classpath:static is a Spring MVC feature that is auto-configured by Spring Boot. The servlet container and servlet context know nothing about it is to be expected that the attempt to access the file via the servlet context does not work.
If you want static content to be served by the servlet container, you should place it in a location where the servlet container can find it. For example, in the root of an application packaged as a war file. If you require further guidance, please ask a question on Stack Overflow.
Uh oh!
There was an error while loading. Please reload this page.
Hello team,
I'm using spring boot 2.0.1.RELEASE.
I'm migrating an application from spring (a WAR) to spring-boot. It uses GWT which uses a servlet that depends on getServletContext().getResourseAsStream() method works as expected.
I've make a reproducible project at
reproissue.zip
When doing a GET Request to http://localhost:8080/mymodule/afile.rpc you can see the file is returned, but if you execute http://localhost:8080/mymodule/dispatch a servlet is executed, the servlet uses getServletContext().getResourseAsStream() to return the same file, but null is returned in that case.
I saw similar issues filed before and marked solved, but maybe in spring boot 2.0.1 is failing again. Similar issues: #8525
The text was updated successfully, but these errors were encountered: