1

I woud like to improve my understanding on how
Java Application Servers handle files encodning.

In my understanding Application servers have to be able to correctly read our static files:
.html,.js,.css, etc.
in order to serve them to the browser.
So here's where the character encoding comes to play:
files encoded in a certain encoding are loaded by the application servers.

My question is: Does JEE specification dictates what the character encoding
of these files must be ?
Is it configurable ?
Any help is appreciated.
Thanks.

GionJh
  • 2,742
  • 2
  • 29
  • 68

1 Answers1

1

The static resources won't be delivered by your java application as they are static, and will be directly delivered by your web server application. If you deliver the files through a GET handled by your web application, Java can manage the charset programmatically.

Here you can see how to set it for Apache.

Community
  • 1
  • 1
Sergio Lema
  • 1,491
  • 1
  • 14
  • 25