Skip to content
Advertisement

Deployed .war generating error: template might not exist or might not be accessible

I have a spring boot application that runs fine on localhost.

I access it with http://localhost:8080/home.

Now I want to deploy the application to a hosting server.

Generated the .war and deployed it there.

Configured http://www.customdomain.com/hostingpath/ to be the root path for the app.

So that should map to what locally is http://localhost:8080/.

Now when I access http://www.customdomain.com/hostingpath/home I’m getting the following error:

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Tue Jan 12 17:40:56 BRT 2021
There was an unexpected error (type=Internal Server Error, status=500).

Taking a look at the logs there’s this message:

org.thymeleaf.exceptions.TemplateInputException: Error resolving template [home], template might not exist or might not be accessible by any of the configured Template Resolvers

Don’t understand how that can be since the home.html was correctly deployed by the .war file to the templates folder in the hosting server.

So the file is there. And when the app runs on localhost it opens home.html just fine.

So what could be causing that error?

Thanks.

Advertisement

Answer

I found the issue. It was a case sensitive issue. My local system is windows, which is not case sensitive. But the hosting server is linux which is case sensitive. When I renamed Home.html to home.html on the hosting server it worked!

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement