我試圖在JSP中獲取日期,就像之前搜索的一樣,但它不起作用。這是我的代碼。錯誤:無法在JSP中解析日曆
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*, java.text.*;" errorPage="" %>
<%!
DateFormat tipe = new SimpleDateFormat("EEE, MMM d, ''yy");
Calendar cal = Calendar.getInstance();
%>
<%
out.print(tipe.format(cal.getTime()));
%>
爲什麼說「日曆無法解析」?錯誤在哪裏?
謝謝老兄,它的工作:) – greenthunder