Error Status 500 in java

-1

I get the following UTF-8 error when I open the HTML view:

  

HTTP Status 500 - type Exception report

     

message

     

descriptionThe server encountered an internal error () that prevented   it from fulfilling this request.

     

exception

     

org.springframework.web.util.NestedServletException: Request   processing failed; nested exception is   org.springframework.webflow.execution.FlowExecutionException:   Exception thrown in state 'adminPlanManejo' of flow 'adminPlanManejo'   root cause

     

org.springframework.webflow.execution.FlowExecutionException:   Exception thrown in state 'adminPlanManejo' of flow 'adminPlanManejo'   root cause

     

javax.faces.FacesException:   com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:   Invalid byte 2 of the UTF-8 sequence of 4 bytes root cause

     

com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:   Invalid byte 2 of the 4-byte UTF-8 sequence note The full stack   traces of the exception and its root causes are available in the   GlassFish Server Open Source Edition 3.1.2.2 logs.

If someone knows what it is and how to solve it, I thank you, since I have tried several ways to solve it and I have not been able to. Thank you in advance for your help.

    
asked by Alexander 21.12.2017 в 21:40
source

1 answer

1

To use utf-8 for the entire project you can add it in web.xml

like this:

<filter>  
<filter-name>encodingFilter</filter-name>  
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>  
<init-param>  
   <param-name>encoding</param-name>  
   <param-value>UTF-8</param-value>  
</init-param>  
<init-param>  
<param-name>forceEncoding</param-name>  
 <param-value>true</param-value>  
</init-param>  
</filter>  
<filter-mapping>  
<filter-name>encodingFilter</filter-name>  
<url-pattern>/*</url-pattern>  

Or if you use maven you can do it this way in pom.xml

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
    
answered by 19.01.2018 / 22:55
source