<%
SimpleDateFormat f=new SimpleDateFormat("yyyyMMdd");
String curdate=f.format(new Date());
%><input type="text" name="RQ" style="width:130" value="<%curdate %>">
这样写报错了。org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 23 in the jsp file: /h1-g-new.jsp
Generated servlet error:
Syntax error on token ".", ; expected
要怎么解决。谢谢
SimpleDateFormat f=new SimpleDateFormat("yyyyMMdd");
String curdate=f.format(new Date());
%><input type="text" name="RQ" style="width:130" value="<%curdate %>">
这样写报错了。org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 23 in the jsp file: /h1-g-new.jsp
Generated servlet error:
Syntax error on token ".", ; expected
要怎么解决。谢谢
Calendar c = Calendar.getInstance();
c.add(Calendar.DAY_OF_MONTH, -1);
string predate = f.format(c.getTime());
Calendar c=Calendar.getInstance();
c.add(Calendar.DAY_OF_MONTH, -1);
String curdate = f.format(c.getTime());
//<%=curdate %>