• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request Object

 
Pradeep Chandrasekharan Nair
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am working on a project where in i have to display date according to the client machines date format. is there any way where i can get client machines date format in my servlet through request object. Thanks in advance.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best way it to ask the client which locale they are in (or want to use). There are ways to get locale info from the client though the request, but none are as reliable as just plain asking.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a typical set of headers from a request and a response.
As you can see, the server sends it's date/time in a header but the browser doesn't send that information.

You will probably need to do this with Javascript.



[this time Paul beat me... ]
[ June 21, 2005: Message edited by: Ben Souther ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic