> From: hsuan [mailto:hs...@nchc.org.tw] > Subject: HTTP Status 500 problem with tomcat5.5
Much better post this time - you actually supplied real information, but you didn't tell us the JVM you're using, nor the platform you're running on. > org.apache.jasper.JasperException: Exception in JSP: /index.jsp:77 > 75: java.text.DateFormat dateFormat = new > java.text.SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy"); > 76: java.util.Date now= new java.util.Date(); > 77: java.util.Date date= dateFormat.parse(now.toString()); > javax.servlet.ServletException: Unparseable date: "Mon Dec 15 11:39:35 > GMT+08:00 2008" This is very odd; I've tried your code in a stand-alone program without any problem: import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; class TestDate { public static void main(String[] args) throws ParseException { DateFormat dateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy"); Date now = new Date(); Date date = dateFormat.parse(now.toString()); System.out.println(date.toString()); date = dateFormat.parse("Mon Dec 15 11:39:35 GMT+08:00 2008"); System.out.println(date.toString()); } } Try running the above test program on your JVM to see what happens. Make sure the spaces in your date format really are spaces and not some other non-printing character. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org