aspose file tools*
The moose likes Servlets and the fly likes Server Date!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Server Date!!!!" Watch "Server Date!!!!" New topic
Author

Server Date!!!!

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
if u post a message in this forum, after ur name ,date is there and that date is the server date date not the client date.
can anyone plz tell me ,what is the technique we can use to implement this and how ?if u can help me with regard to servlet,that will be better.
Thanks!
R Mutum
Greenhorn

Joined: Sep 07, 2000
Posts: 4
Raj:
You will get the server date as long as the code runs on the server. You can put the following code in a jsp page or a servlet:
java.util.Date today = new java.util.Date();
out.println("Today is :" + today);
If you want the client date, you have to use JavaScript or VBscript that runs on the client.
Thanks.
RM

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Thanks,
i got the date ,actually the problem was with my server only.
i had used the same method,now server is ok.
Thanks, for ur advice.
Raj.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Server Date!!!!