[RESOLVIDO] Ajax - Servlet : Erro estranho

0 respostas
marcioa1

Olá !

Na minha aplicação, uma página faces chama um servlet via Ajax ( XMLHttpRequest ) . Quando eu coloco um comando de busca no banco de dados, dá o seguinte erro :
Error Loading Pagen500:Internal Server Error
.

O que significa ? Onde errei ? Sem o acesso ao banco, tudo funciona bem.

Meu Servlet
public class Resposta extends HttpServlet {

	public  void doGet(HttpServletRequest request, HttpServletResponse  response)
	throws IOException, ServletException {
		//UserOp userOp=new UserOp();//business layer class.
		//implementation not shown for brevity

		//get the userId
		String targetId = request.getParameter("codigoEmpresa");
		//check the id. If it is not existing already then return true else false

		response.setContentType("text/xml");
		response.setHeader("Cache-Control", "no-cache");
		
		try {
			BdPrestador bd = new BdPrestador();
                        // ERRO NA LINHA ABAIXO
			DTOPrestador umPrestador = bd.buscaPeloCodigo("100013");
			response.getWriter().write("<nomeDivulgacao>"+umPrestador.getNomeDivulgacao()+"</nomeDivulgacao>");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

Obrigado,

Márcio

[SOLUÇÃO]

Era um jar que não estava no projeto. :oops:

Valeu !

Criado 8 de janeiro de 2007
Respostas 0
Participantes 1