Server glassfish jee probleme de requette "Invalid byte 2 of 3-byte UTF-8 sequence."
Bonjour voici mon bean :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
@Named /*("loginBean")*/
@SessionScoped
public class LoginBean implements Serializable {
private static final long serialVersionUID = -5433850275008415405L;
private String login = "James";
private String password = "007";
puis getter et setter public String getPassword() {
System.out.println( "in getPassword" );
return password;
}
public void setPassword(String password) {
System.out.println( "in setPassword with " + password );
this.password = password;
}
public String returnAction() {
System.out.println( "in returnAction" );
return password.equals( "007" ) ? "success" : "failure";
} |
Exemple de déclaration UTF-8
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">
<display-name>WebStoreJSF</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
</web-app> |
j'y travaille depuis 48h avec le même résultat "com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 3-byte UTF-8 sequence."