Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

executing a jsp from a java application

Thread view: 
marcussilfver@gmail.com - 26 Mar 2008 09:31 GMT
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
Alex.From.Ohio.Java@gmail.com - 26 Mar 2008 13:39 GMT
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
[quoted text clipped - 20 lines]
>
> 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/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.