这样,你试试,一定行:
SimpleDateFormat bartDateFormat =new SimpleDateFormat("yyyy-mm-dd");
Date date = new Date();
System.out.println(bartDateFormat.format(date));
org.apache.jasper.JasperException: Unable to compile class for JSPF:\MyJava\BsDather\bsdatagather\work\localhost_8080\_0002ftest_0002ejsptest_jsp_68.java:115: ???? DateFormat?
DateFormat df = DateFormat.getDateInstance();
GregorianCalendar jt = new GregorianCalendar();
Date d1=jt.getTime();
DateFormat df = DateFormat.getDateInstance();
String s1=df.format(d1);
out.println(s1);
or
Date d=new Date();
DateFormat df = DateFormat.getDateInstance();
out.println(df.format(d));