I have a very simple application I have designed to retrieve information from a 
database (Access 2000).? I am running IPlanet 4.1 and when I run this method called by 
a submit, I get an error that says: "Document contains no data.? Contact Server's 
Admin"? I tried this method as a get and a post.? If I call the method explicitly from 
the URL I get "HTTP method GET is not supported by this URL".? With IE I just get page 
not found screen.? Any Ideas?
?
?
Regards,
Travis D. Falls
[EMAIL PROTECTED]
?
public void doPost(HttpServletRequest req, HttpServletResponse res)
??????? throws ServletException, IOException{
?
?????res.setContentType("text/html");????????
?????PrintWriter out = res.getWriter();
?
//Works up to here. out.println("hello Here");
????????
? try{
??Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
??connection =
???DriverManager.getConnection("jdbc:odbc:Customer_mdb","guest","guest");
??}
?
?catch(Exception e){
??log("an exception was found afterConnectionconnection=DriverManager",e);
??connection = null;
??}
//Works up to here out.println("hello Here");?
?
? try{
?? statement = connection.createStatement();
?? resultset = statement.executeQuery(Query);?
??
?
??out.println("<html><head><title>B-SiDE Music Store</title></head><body><table>");
??while (resultset.next()) {
??String c = resultset.getString("Customerid");
??String f = resultset.getString("FirstName");
??String l = resultset.getString("LastName");
??String e = resultset.getString("e-mail");
??String s = resultset.getString("status");
??String p = resultset.getString("Password");
??String z = resultset.getString("ZipCode");
??out.println("<tr><td>"+ c +" "+ f + " "+? l +" "+ e +" "+ s +" "+ p +" " + z 
+"</td></tr>");
}
?? statement.close();
?
? }
? catch(SQLException sqlex){
??log("and sql exception", sqlex);
? }
?
}

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to