Erro com response

0 respostas
LinuxBrasil

Bom dia Pessoal,

Sou novo em Desenvolvimento WEB, e por isso estou com um probleminha :
A minha aplicação está dando este erro :

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

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

exception

java.lang.IllegalStateException: Cannot forward after response has been committed
ServerAction.LoginServer.processRequest(LoginServer.java:120)
ServerAction.LoginServer.doPost(LoginServer.java:140)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.

--------------------------------------------------------------------------------

O que pode Ser ?

O meu codigo esta assim :

protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
       
        FormatarMatricula matriculaFormatar = new FormatarMatricula();
        
        
        String usuario = request.getParameter("Usuario");
        String senha = request.getParameter("Senha");
        
        usuario = matriculaFormatar.Matriula(usuario);
        
        // verifica se digitou algo
        if((usuario.equals(" ")||(senha.equals(" ")))){
           
            RequestDispatcher dispatcher = request.getRequestDispatcher("/login_erro.html");
            dispatcher.forward(request, response);
           
           
            
        }else {

         }

O problema é quem não exibe a pagina de erro de login

Criado 13 de maio de 2008
Respostas 0
Participantes 1