You may have more details on what happens if you output
the exception caught aswell.
catch(SQLException e) {
_res.sendError("your message <BR>");
_res.sendError(e);
}
Claude
Sa wrote:
>
> Hi,
>
> I have a online register form and and I used servlet to insert info into MySQL
> database. When I fill the form the first time, it works fine and it can be
> properly inserted into database. However, when I fill the form the second time,
> I got the following error:
> "Accepted
> The server encountered an internal error or misconfiguration and was unable to
> complete your request.
> More information about this error may be available in the server error log."
>
> I checked the log file and it showed:(ERROR) ajp12: Servlet Error: The request
> has been accepted, but it failed to complete due to a problem querying the
> database.
>
> If I stop the server and restart the server, then it works again. But one more
> time, I got the error again. I don't know if it's due to the servlet code or due
> to some misconfiguration of my apache server or Apache JServ or mySQL. Also, I
> don't know why I can't use "doPost()" method, but only "doGet()" method. Can
> someone give me any clue? Thanks!
>
> P.S. I attached the servlet code (adduser1.java) with this email.