0
I would like to set a timeout for a particular action on JSP pages, which should work with the following conditions below:
When I click a button for example "Travel", the page should somehow save the start time and end time and tell how much time to reach a given destination.
When I’m not on the page, time should continue.
When I enter the page again, the page should show me how much time remaining to reach a certain destination from second to second.
Making use of this:
To determine how long the user will be able to perform the same action in the web application again, as there should be intervals.
Have you ever done anything? Post the code of what you already have or something close that you tried
– Maicon Carraro
I haven’t developed anything yet in relation to the timeout due to lack of knowledge of functions and ways to reach the goal according to the conditions cited.
– Luiz Ricardo Cardoso
Some points you need to set is, how will you identify if the person who left the screen will be the same as coming back. Do you plan to use session? will save something in bank?
– Maicon Carraro
possible duplicate of How to set a Java expiration time?
– Bruno César
I will use session yes, and I will also save the
hora_inicio
andhora_final
to compare on the page if you have already given the time... But when you do this comparison, I have to have the remaining time being displayed on the page from second to second, showing the remaining minutes without having to run aquery
second by second.– Luiz Ricardo Cardoso
@I will be deleting the question cited, because many users are understanding that it is only a user session, and that is not it!
– Luiz Ricardo Cardoso
Hi Luiz Ricardo I think I know what you want! Still want to delete the question? I can try to help you. I think what you need is Websockets + a server-side session. Is that it? Websockets has these powers that you quoted.
– Filipe Miranda
Yes that’s right @Filipegonzagamiranda gave a read on the purpose of Websockets and that’s really what I want, now the challenge is to make use of this guy... You have knowledge of the use of Websockets, where I can find good content that explains ways to use?
– Luiz Ricardo Cardoso
@Filipegonzagamiranda do the following... answer the question with a link of ways to use Websockets, and then I will accept your answer as useful in relation to the question.
– Luiz Ricardo Cardoso
Sure! It is not very difficult to use. You will like the technology.
– Filipe Miranda
I will definitely go, I am researching in depth... I saw videos of use and I also saw what is capable... very interesting and I will also use a lot!
– Luiz Ricardo Cardoso