executing a jsp from a java application

Discussion in 'Java' started by marcussilfver@gmail.com, Mar 26, 2008.

  1. Guest

    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
     
    , Mar 26, 2008
    #1
    1. Advertising

  2. Guest

    On Mar 26, 4:31 am, 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/
     
    , Mar 26, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DigitalUncle
    Replies:
    0
    Views:
    984
    DigitalUncle
    Nov 2, 2004
  2. Sharp Tool
    Replies:
    7
    Views:
    19,721
    Andrew Thompson
    Jul 20, 2005
  3. Replies:
    0
    Views:
    4,503
  4. vineetha
    Replies:
    0
    Views:
    951
    vineetha
    Oct 8, 2007
  5. Replies:
    2
    Views:
    537
Loading...

Share This Page