• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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.
 
BWA HA HA HA HA HA HA! Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic