Category Archives: Java

REST handling empty POST body and filters concepts

http://stackoverflow.com/questions/20585348/post-empty-body-with-jersey-2-client   http://stackoverflow.com/questions/13326142/how-to-handle-empty-null-request-payload-in-jersey-rest   https://jersey.java.net/documentation/latest/filters-and-interceptors.html   http://www.mkyong.com/tutorials/jax-rs-tutorials/   http://www.mkyong.com/webservices/jax-rs/json-example-with-jersey-jackson/

Date and SimpleDateFormat

http://stackoverflow.com/questions/1459656/how-to-get-the-current-time-in-yyyy-mm-dd-hhmisec-millisecond-format-in-java date.toString() would do if wanted to have a SimpleDateFormat(yyyy-MM-dd HH mm ss SSS)   Parsing back to Date from String.. http://stackoverflow.com/questions/9431927/how-to-convert-date-tostring-back-to-date Date d = new Date(); long l = d.getTime(); Date theSameDate = new Date(l); Date d = new Date(); String s = d.toString; Date theSameDate = new SimpleDateFormat(“EEE MMM dd HH:mm:ss zzz yyyy”).parse(s);… Read More »