i'm not quite sure this is the right forum to post this... please forgive me...
i'm making a servlet
it takes info from an html form and uploads it to a data base using jdbc
that works just fine
each time i run it, i get a console report that i want to view into a new html web page but two errors appear
this are my headers
import java.io.*;
import java.sql.*;
import java.text.*;
//import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
this is part of the code
public void doGet(HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/html");
out = res.getWriter();
try {
SendFile("client.html");
} catch (Exception e) {
System.err.println( "error!" );
}
Date d = new Date();
SimpleDateFormat f = new SimpleDateFormat("EEEE, MMMM d, yyyy");
String ds = f.format(d);
SimpleDateFormat f1 = new SimpleDateFormat("hh:mm a");
String ts = f1.format(d);
Date dout = new Date(d.getTime()+1000*60*45);
String ts1 = f1.format(dout);
out.println("<TR>");
out.println("<TD>Date: "+ds+"<BR/>Time: "+ts+"</TD></TR>");
//stuff, stuff, stuff
}
the errors are
cannot find symbol
symbol: method SendFile(java.lang.String);
//that is the file i want to put the report in...
cannot find symbol
symbol: constructor Date();
that is sql.Date
because
if i uncomment the
//import java.util.*;
it says its an ambiguos call
can anyone tell me what am i missing to use the SendFile() and how to fix Date()?
in the end i can get rid of displaying date, but i want the sendfile working. please help (or tell me in which thread should i post this to get an answer)