Results 1 to 5 of 5
  1. #1
    djeffer_ch2 is offline Member
    Join Date
    Nov 2010
    Posts
    2
    Rep Power
    0

    Default Is it possible to use a JSP with an app running in background?

    Hi everybody,

    I would like to known if I can (and how to if possible) use a web browser to retrieve some data from an application running in background. In other words, I have to write a java application which is doing something, and interconnected with a web browser from which clients obtain some "real time" data of the app. Is it possible? If so, where I can find the information?
    Thanks for your time.

    DJ

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    I would think this might be partly javascript (ran in the browser) and partly custom servlet.

    For example, create a JSP page that renders the page that displays the stuff you want to show. And a Javascript function is invoked in the background on a scheduled task to invoke an AJAX style asychronous request to your server application, where the URL it invokes could be a servlet within your application that generates XML or JSON data, which the JavaScript response handler in your web page receives and renders DHTML style updates to the page viewed in the browser.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    If you want to handle the process without knowing the client (by avoiding page postback and so on), yes AJAX + JS request model is more suitable. But yet it's hard to control sometime if you've not implement properly from the begining. GET/POST request make lots of issues if you are not properly use them.

  4. #4
    djeffer_ch2 is offline Member
    Join Date
    Nov 2010
    Posts
    2
    Rep Power
    0

    Default

    Thanks for your reply. I will try in that way. Any good documentation to read?

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. How to Run a .exe in background???
    By jazz2k8 in forum New To Java
    Replies: 9
    Last Post: 01-21-2011, 11:27 AM
  2. Need help with Timer running in background
    By Azure in forum New To Java
    Replies: 2
    Last Post: 05-22-2010, 02:08 PM
  3. Replies: 0
    Last Post: 08-26-2009, 01:03 PM
  4. get keyboard input while running in the background?
    By gen1mx6 in forum Advanced Java
    Replies: 16
    Last Post: 07-16-2009, 03:51 PM
  5. Image as background
    By Java.child in forum AWT / Swing
    Replies: 2
    Last Post: 10-02-2008, 11:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •