Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] migration woes from version 9 to 10 - possible character encoding issue

I think JVM picks up the systems default encoding if you don't override it. Did you try setting default encoding to UTF-8 by passing JVM arg at startup (-Dfile.encoding=UTF-8)?

Best,
Matthias

Aug 17, 2022, 14:13 by jetty-users@xxxxxxxxxxx:

>
> I am working to migrate a project codebase from jetty version 9.4.46 to version 10.0.11.  The set up is an embedded servlet with Kerberos authentication and works just fine when running from an IDE; however, when running it from an uber jar things go south.  When running on the working system with the jar (instead of IDE), a “HTTP Error 401 Unauthorized” response is returned; however, when running on a different system (with jar) a GSSException Invalid argument 400 – cannot find key of appropriate-type to decrypt is returned.  After comparing debug messages, the difference that jumps out is the Content-Type.  For the instance that works, the type is listed as “text/html;charset=utf-8”.  For the two that do not work, it is “text/html;charset=iso-8859-1”.  My suspicion is that the jar has something missing or misplaced.  That said, I did verify that the encoding.properties file existed and the contents matched those of the working one.
>
>
>  
>
>
> Any clues to where to look next?>  
>
>
>  
>
>
> Is there a global way to force jetty to use UTF-8?  If not global, some other way?  (Thought is that taking that approach could possibly quickly verify my hunch)
>
>
>  
>
>
> Thank you ahead of time for your time and suggestions!
>
>



Back to the top