• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Passing current date/time with request

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello all,

is there a way that i can pass the current date and time with the request using javascript. I want to read out this information in the java-code (Struts application) handling the request. Does anyone know how to do this?
I want to execute this script preferably on a submit so i know exactly when the client submit a request or a post.

Thanks a lot!!
[ May 24, 2005: Message edited by: Ricardo Estafan ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Something like this will get the users time:

BUT you have to remeber that this time is different than the servers, why don;t you just grab the servers time when you are saving the data to the database? Now sure why you would rely of JavaScript for this which can be disabled by the user.

Eric
 
Ricardo Estafan
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are exactly correct, i am not sure my self. I want to measure the performance of a java application. Client time and server time, but come to think of it preferably without changing the existing code. Perhaps i will post this question in another topic.
 
reply
    Bookmark Topic Watch Topic
  • New Topic