executing a jsp from a java application

M

marcussilfver

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
 
A

Alex.From.Ohio.Java

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top