api看不懂,全英语。。。
我不是什么高手,呵呵
所以才要到处请教拉
我现在这样写对吗?tomcat报错,我是菜鸟,一直在努力学习,所以大侠您就包容下吧
SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd.HHmmss"
;
String time= fmt.format(dt);
long addtime=Long.parseLong(time);
out.println("String:  "+time+"
Float :  "+addtime);
%>
这是报错:
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: For input string: "20060606.110442"
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NumberFormatException: For input string: "20060606.110442"
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
java.lang.Long.parseLong(Long.java:403)
java.lang.Long.parseLong(Long.java:452)
org.apache.jsp._456_jsp._jspService(_456_jsp.java:52)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)