hi,
i have a scary problem. my jsp page contains the following code:
<%
Driver DriverMySQL;
Connection verbindung;
Statement stmt;
ResultSet rs;
try {
DriverMySQL =
(Driver)Class.forName("org.gjt.mm.mysql.Driver").newInstance();
verbindung =
DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/dateiablage
?user=admin password=admin");
String id = request.getParameter("id");
PreparedStatement ps = verbindung.prepareStatement("delete from user where
(id='"+id+"')");
ps.execute();
ps = verbindung.prepareStatement("delete belongs where (userid='"+id+"')");
ps.execute();
response.sendRedirect("show_user.jsp");
verbindung.close();
} catch (Exception e) {
response.sendRedirect("error.jsp?meldung=" + e.getMessage());
}
%>
thats all. i use it to delete a user from the database. the program deletes
the user but it doesn't redirect to show_user.jsp, but closes all active
browserwindows (ie).
can somebody help me??
regards,
sebastian
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets