写一个.properties文件就好了
一个property记录日期,即20041205
一个property记录编号,即02然后写个小程序,判断当前日期和记录日期是否一致,如果一致就将记录编号加1,如果不一致,则将记录编号返回01。然后将记录日期和记录编号字符串连接一下输出就搞定!
一个property记录日期,即20041205
一个property记录编号,即02然后写个小程序,判断当前日期和记录日期是否一致,如果一致就将记录编号加1,如果不一致,则将记录编号返回01。然后将记录日期和记录编号字符串连接一下输出就搞定!
解决方案 »
- 请问wordpress有java版本的木?
- java反射消耗性能的问题
- 增加百度搜索结果的富文本
- 求助,数据库连接不上
- tomcat不能为jps加载类的错误,请大家帮忙看看吧
- 初学者,今天开始接触jdom
- struts2 if标签我从action返回一个member的list集合怎么用if判断字段
- form问题
- 现在的腾讯微博模拟登录上了之后会话为什么会失效?
- 报错:HTTP Status 503 - Servlet org.apache.catalina.INVOKER.xingzhengguanli is currently unavailable
- window.location.reload();怎么有时候不能刷新页面???在线等!!
- 函数中数组参数应该怎么写?
number= xxxxx; //get from the data base(string )
number=Integer.parseInt)number.subString(11))+1;rightnow=new GregorianCalendar()
SimpleDateFormat pattern = new SimpleDateFormat("yyyyMMdd");
String time=pattern.format(this.rightnow.getTime());
String modelnumber="com"+time+number;
if(!maxid.subString(0,10).equals("com"+(new Date().getYear+1900)+(new Date().getMonth()+1)+new Date().getDate())){
当前id="com"+(new Date().getYear+1900)+(new Date().getMonth()+1)+new Date().getDate()+"01";
}else{
当前id="com"+(Long.parseLong(maxid.subString(3,12))+1);
}
id="com"+(new Date().getYear+1900)+(new Date().getMonth()+1)+new Date().getDate()+"01";
getYear后面少了() 不好意思
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:68: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
if(!maxid.subString(0,10).equals("com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate())){
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:68: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
if(!maxid.subString(0,10).equals("com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate())){
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:68: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
if(!maxid.subString(0,10).equals("com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate())){
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:68: cannot resolve symbol
symbol : method subString (int,int)
location: class java.lang.String
if(!maxid.subString(0,10).equals("com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate())){
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:69: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
bianhao="com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate()+"01";
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:69: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
bianhao="com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate()+"01";
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:69: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
bianhao="com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate()+"01";
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:71: cannot resolve symbol
symbol : method subString (int,int)
location: class java.lang.String
bianhao="com"+(Long.parseLong(maxid.subString(3,12))+1);
^
8 errors .service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.29 logs.type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:68: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
if(!maxid.subString(0,10).equals("com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate())){
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:68: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
if(!maxid.subString(0,10).equals("com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate())){
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:68: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
if(!maxid.subString(0,10).equals("com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate())){
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:68: cannot resolve symbol
symbol : method subString (int,int)
location: class java.lang.String
if(!maxid.subString(0,10).equals("com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate())){
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:69: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
bianhao="com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate()+"01";
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:69: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
bianhao="com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate()+"01";
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:69: cannot resolve symbol
symbol : constructor Date ()
location: class java.sql.Date
bianhao="com"+(new Date().getYear()+1900)+(new Date().getMonth()+1)+new Date().getDate()+"01";
^
An error occurred at line: 9 in the jsp file: /add.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\diannao\org\apache\jsp\add_jsp.java:71: cannot resolve symbol
symbol : method subString (int,int)
location: class java.lang.String
bianhao="com"+(Long.parseLong(maxid.subString(3,12))+1);
^
8 errors
不好意思,我是新手,刚试过,有问题以上,还请楼上的帮忙解决!有点急!谢谢!!