Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Servlet: Automated Static Database Updates, Time and random values

1: How do i make my servlet do a static update to an access database, for example, Every hour, a certain field has to +2 to the value, etc.
2: And how do i display time (sorry if its a noob question :P)
3: What is the code to generate a random value, lets say i want a random value from 50 - 100 accurate to decimal places.

thx in advance


Comments

  • BreadfanBreadfan Member Posts: 22
    : 1: How do i make my servlet do a static update to an access database, for example, Every hour, a certain field has to +2 to the value, etc.
    : 2: And how do i display time (sorry if its a noob question :P)
    : 3: What is the code to generate a random value, lets say i want a random value from 50 - 100 accurate to decimal places.
    :
    : thx in advance
    :
    :
    :

    <<<<< 1:
    Maybe you could create a Thread that accesses and updates your database every hour and put it in the ServletContext(If you encounter problems when putting the thread in the ServletContext as an attribute, try to wrap it in another object - HashSet/ArrayList or just define some object that has the Thread). Then request a servlet which starts the Thread through a browser every time you start the server.

Sign In or Register to comment.