Erro estranho

0 respostas
joaosavio

PWC4011: Unable to set request character encoding to UTF-8 from context /WebSiViU, because request parameters have already been read, or ServletRequest.getReader() has already been called

Olá pessoal, o q é isso?

To usando richfaces+hibernate+postgreSQL

no site do glassfish ta assim

This warning message means that the web container is complaining about the fact that the web application deployed at /your_webapp is trying to set the request encoding too late in the request’s lifecycle, when it is impossible for the container to honor it.

See the javadocs of javax.servlet.ServletRequest.setCharacterEncoding():

This method must be called prior to reading request parameters or reading input using getReader(). Otherwise, it has no effect.

The container issues a warning to let you know that a call to ServletRequest.setCharacterEncoding() by your_webapp has no effect and is being ignored, because one of the above conditions is met.

To avoid this warning, your_webapp should move its invocation of ServletRequest.setCharacterEncoding() to an earlier stage, before it acquires any input reader from the request, or before it reads any request parameters. In case your_webapp is not responsible for this warning, one if its dependencies might be, in which case that library needs to be fixed.

“your_webapp should move its invocation of ServletRequest.setCharacterEncoding() to an earlier stage,”
como fazer isso?

Criado 2 de agosto de 2008
Respostas 0
Participantes 1