Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Passing current date/time with request

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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