For Programmers: Free Programming Magazines  


Home > Archive > Java Help > May 2006 > hi reg jsp page redirect









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author hi reg jsp page redirect
arvindkannan1@gmail.com

2006-05-31, 7:12 pm

hi all i have jsp page -where the user fills up some fields.basically i
dont want user to fill up those forms during nightime . so
i take system time which is cst and calculate whether its am or pm and
if its between 7pm and 6am i redirect saying u cannot fill it up.

the executables are placed in server which is located in cst time zone.

what happens is when any person from asian counties click the link its
not redirecting its still shows the form .

when i test it locally its fine .any help cant i take the system time
and redirect based on that

thanks for the help

Fred Kleinschmidt

2006-05-31, 7:12 pm


<arvindkannan1@gmail.com> wrote in message
news:1149092960.300356.66880@h76g2000cwa.googlegroups.com...
> hi all i have jsp page -where the user fills up some fields.basically i
> dont want user to fill up those forms during nightime . so
> i take system time which is cst and calculate whether its am or pm and
> if its between 7pm and 6am i redirect saying u cannot fill it up.
>
> the executables are placed in server which is located in cst time zone.
>
> what happens is when any person from asian counties click the link its
> not redirecting its still shows the form .
>
> when i test it locally its fine .any help cant i take the system time
> and redirect based on that
>
> thanks for the help
>

You need get the time zone in which the system time is being
obtained, and convert the time to
--
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Software Reuse Project
your time zone.


Oliver Wong

2006-05-31, 7:12 pm


<arvindkannan1@gmail.com> wrote in message
news:1149092960.300356.66880@h76g2000cwa.googlegroups.com...
> hi all i have jsp page -where the user fills up some fields.basically i
> dont want user to fill up those forms during nightime . so
> i take system time which is cst and calculate whether its am or pm and
> if its between 7pm and 6am i redirect saying u cannot fill it up.
>
> the executables are placed in server which is located in cst time zone.
>
> what happens is when any person from asian counties click the link its
> not redirecting its still shows the form .
>
> when i test it locally its fine .any help cant i take the system time
> and redirect based on that
>
> thanks for the help


When you say "cant i take the system time", do you mean the time local
to where the user is, or to where your server is?

If the answer is the user, the answer is "no". Otherwise, the answer is
"yes".

- Oliver

sivga

2006-05-31, 7:12 pm


Oliver Wong wrote:
> <arvindkannan1@gmail.com> wrote in message
> news:1149092960.300356.66880@h76g2000cwa.googlegroups.com...
>
> When you say "cant i take the system time", do you mean the time local
> to where the user is, or to where your server is?
>
> If the answer is the user, the answer is "no". Otherwise, the answer is
> "yes".
>
> - Oliver


Thanks for the help i guess i need to take the timezone into
consideration my server will be in cst and if i jus take date.gethours
.... wont help coz users will be in different time zone.

thanks

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com