reset password
Author Message
raylongma1018
Posts: 81
Posted 01:50 Aug 04, 2015 |

i read the file log4j.dtd from your csjob-midterm project, I don't understand what the contents means. your video lecture only explain the log4j.xml, never cover log4j.dtd. is log4j.dtd gonna be in the midterm?

Also from your video lecture, you have explained how to download and upload files. so if a applicant wishes to upload a research statement let's say rs1.pdf how do we retrieve the file name, size, date,and type? because we need these information in order to save into the database table "files" from java. In our midterm do we require to save file information into the database? I believe your video lecture only covers how to download and upload files. 

is round.java, review.java and file.java gonna be covered in the midterm?do we need to know how to implement some functions into these parts?

 

cysun
Posts: 2935
Posted 08:39 Aug 04, 2015 |

1. A DTD specifies what elements and attributes are valid in an XML file. It was superseded later by XML Schema, which is used by most of the XML files in the project, but I think log4j 1.2 still uses DTD. These XML standards are quite complex (which is one of the reasons why many people hate XML) and not that useful at the application level so I don't cover them in class. You don't really need to worry about it though. The reason it's there is for Eclipse to validate log4j.xml. If you delete log4j.dtd, you'll get an Eclipse warning saying something like "cannot validate log4j.xml", but everything will still work fine.

2. I showed in the lecture how to upload a file using MultipartFile. You need to decide how to use that in a particular application.

3. I'm not going to tell you whether something will or will not be in the midterm, but obviously you should understand all the code given to you and be prepared to implement any function (that does not require JavaScript/jQuery/Ajax).

raylongma1018
Posts: 81
Posted 11:36 Aug 04, 2015 |

so when I check the database table"file" is Name means" name of the file?"type" means content type of the file? size means file size in byte? but how about date? I check the multipart file functions in spring, there are functions to get the information I want except the date. I wonder how to get the last modified date from the file using spring multipartfile. or should we do it in diffferent way?

cysun
Posts: 2935
Posted 12:03 Aug 04, 2015 |

Date is the timestamp of when the file is uploaded or saved (or whatever you want it to mean), not the timestamp of the original file on the client, which is not sent to the server.