开发者

incorrect date displayed in JSP view

Need help in viewing date.

I'm using jquery-1.4.2.min, json-simple-1.1, gson-1.4

I have a table that is used to save command out开发者_运维问答put executed in scheduled period. The data starts from 08-12-2010 and ends at 02-01-2011.

The table structure is as follows:

CREATE TABLE commandoutput (
  id bigint(20) NOT NULL AUTO_INCREMENT,
  command varchar(255) DEFAULT NULL,
  fromHost varchar(255) DEFAULT NULL,
  toHost varchar(255) DEFAULT NULL,
  executionDate datetime DEFAULT NULL,
  passed tinyint(1) DEFAULT NULL,
  operator varchar(255) DEFAULT NULL,
  cooperationType varchar(255) DEFAULT NULL,
  rawOutput text,
  country varchar(255) DEFAULT NULL,
  PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=169279 DEFAULT CHARSET=latin1;

The problem is the data displayed in JSP view is not as expected. The problem didn't happen at the first time I tested this a month ago using sample data. Now using real time data with more than 150.000 records, the view is messed up.

Sample Data:

incorrect date displayed in JSP view

passed=1, failed=0

JSP View:

incorrect date displayed in JSP view

I've checked in Firebugs that the response given in json is the data with incorrect date.

I've tested this using IE7, IE8, FF3.6, Chrome8 with same result.

Does anyone have similar problem before? What is the solution?


Since the json includes the incorrect date the problem does not lie with the jsp.
As you said that it worked correctly with your test cases, The actual problem lies in the fact that your test case data does not match the actual data. What I would do is compare the two different sets of data and make your test data match the actual data and go from there.


I just found out that the problem is not view-related rather because the bug in database url that I use. hibernate.url=jdbc:mysql://localhost/dbpmpireg?useCursorFetch=true&useServerPrepStmts=true

thanks for your help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜