| Author |
Request Object
|
Pradeep Chandrasekharan Nair
Ranch Hand
Joined: Apr 01, 2004
Posts: 48
|
|
|
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
Joined: Apr 14, 2004
Posts: 10336
|
|
|
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.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
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 ]
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: Request Object
|
|
|