1)
I need to perform this extracting activity at periodic intervals since
I dont know when a site gets updated.
a) Do I create a POJO timer program that periodically fetches the
file, extracts the contents and store in database using Swing and just
the JSP and getters to read the data from database ?
b) Or it would be fine enough if I keep the POJO inside the webApp and
run it periodically.
Then Updation and deletion of both would be needed automatically.
2) In either of the cases, I need a single page displaying all the
extracted contents. As the updation to database is done
automatically,
a) would the autorefresh of my jsp page retreive new information of
all the contents from the database?
b) Or I will need to create a sendRedirect that makes a retreive call
to database to retreive all the latest details and get back to my main
page. I think 2a) would not work since it would be server side code
that is retreived once and only 2 b) is possible.
I think you can implement this by using and XmlHttpRequest(Ajax call).
Yes you need a scheduler for checking the the updated data for
particular interval.
The Best scheduler open source project is Quartz API
You can run the timer inside the web application there wont be a
problem for that.
You need not create a seperate applicaton for the timer.
On Feb 5, 9:13 am, Rejin Chandran <reji...@gmail.com> wrote:
> Why dodn't u call a shellscript in cron and do this extracting activity
> instead of using Timer class.
>
> > that is retreived once and only 2 b) is possible.- Hide quoted text -
>
> - Show quoted text -