I have a jsp that checks which clients that are connected. This works
well! When I from a browser loads the jsp page, information about how
many clients is connected is presented in the browser and also
appended to a logfile on the Windows 2003 server machine.
Now I want to write a Java application that is to always be running on
the server. In this Java application there is a timer that expires,
lets say every 10 minutes. When the timer expires a certain method
(lets call it timerEventHandler) in the java application executes.
Question:
How can timerEventHandler execute the jsp so that information about
connected clients is appended to the logfile at every 10 minute?
I would really like som code for this. I have searched the Internet
for a couple of days now. I tried using JEditorPane and construct a
minimal webbrowser that would load the jsp page, but after trying
several examples of java webbrowsers it seems that I am behind proxys,
firewalls, or whatever that makes it impossible for me to load a
webpage. I can however start IE and load the page. Does anyone have an
idea what can be done?
thanks
|
|
0
|
|
|
|
Reply
|
marcussilfver (26)
|
3/26/2008 8:31:59 AM |
|
On Mar 26, 4:31 am, marcussilf...@gmail.com wrote:
> I have a jsp that checks which clients that are connected. This works
> well! When I from a browser loads the jsp page, information about how
> many clients is connected is presented in the browser and also
> appended to a logfile on the Windows 2003 server machine.
>
> Now I want to write a Java application that is to always be running on
> the server. In this Java application there is a timer that expires,
> lets say every 10 minutes. When the timer expires a certain method
> (lets call it timerEventHandler) in the java application executes.
>
> Question:
>
> How can timerEventHandler execute the jsp so that information about
> connected clients is appended to the logfile at every 10 minute?
>
> I would really like som code for this. I have searched the Internet
> for a couple of days now. I tried using JEditorPane and construct a
> minimal webbrowser that would load the jsp page, but after trying
> several examples of java webbrowsers it seems that I am behind proxys,
> firewalls, or whatever that makes it impossible for me to load a
> webpage. I can however start IE and load the page. Does anyone have an
> idea what can be done?
>
> thanks
Here is full example:
http://www.exampledepot.com/egs/java.net/ReadFromURL.html
Also, when you read your own web page on your own application server
you do not use proxy.
Alex.
http://www.myjavaserver.com/~alexfromohio/
|
|
0
|
|
|
|
Reply
|
Alex.From.Ohio.Java (56)
|
3/26/2008 12:39:52 PM
|
|