Okay. When you use a browser to display the HTML containing that Javascript, you see the date displayed. But now you did something else ("put it in server" -- what does that mean?) and now there's some kind of a problem.
So the next thing
you should do is to explain what you did, what the problem is, and why it's a problem. Right now we have no idea what you did for a start.
Edit: I agree with Maks, I don't see what JSF has to do with this. Although it might turn out that JSF is part of the problem description, when we find out what it is. In the meantime I will move this to the HTML forum.