Null date in java code when i run the web service from server -


I created a web service and send the file to the client server. Then the server must save the file. File name I want to be something like message. 013.03.20.13.55.43.xml (yyyy.mm.dd.hh.mm.ss). I have deployed the web service but the files are saved like message_.xml (files overwritten), which means that the date string is zero. This is a part of my code:

  date format dateformat = new simpledatform ("yaya / mm / dd hh: mm: ss"); Date = new date (); String current_date = dateFormat.format (date) .toString (). ReplaceAll (":", "."); Current_date = current_date.replaceAll ("", "."); Current_date = current_date.replaceAll ("/", ".") ;; String pathname = "c: \\ soap_loadload \\ message_" + current_date + ".xml";   

When I test it on my local host, it runs right. The operation system of the server is Windows 2008 R2.

I think that you just see as the filename Message_ and its icon is probably the icon of the xml files. The Windows File Manager probably hides the extension from you. It probably thinks that everything is expanded after the first file and the filename This part hides from you. This is possible because you are using dots in the file name. Try to check it for the first time.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -