Results 1 to 5 of 5
- 11-05-2010, 06:19 PM #1
Member
- Join Date
- Nov 2010
- Posts
- 2
- Rep Power
- 0
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
- 11-07-2010, 01:33 AM #2
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.
- 11-07-2010, 01:42 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
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.
- 11-11-2010, 09:13 PM #4
Member
- Join Date
- Nov 2010
- Posts
- 2
- Rep Power
- 0
Thanks for your reply. I will try in that way. Any good documentation to read?
- 11-12-2010, 09:31 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If you want to learn more about AJAX/JS click on w3c official website. You can find all related stuff in details with examples.
Similar Threads
-
How to Run a .exe in background???
By jazz2k8 in forum New To JavaReplies: 9Last Post: 01-21-2011, 11:27 AM -
Need help with Timer running in background
By Azure in forum New To JavaReplies: 2Last Post: 05-22-2010, 02:08 PM -
Problem in running Java swing wizard in jre 1.6 while it is running in jre 1.4
By Sanjay Dwivedi in forum AWT / SwingReplies: 0Last Post: 08-26-2009, 01:03 PM -
get keyboard input while running in the background?
By gen1mx6 in forum Advanced JavaReplies: 16Last Post: 07-16-2009, 03:51 PM -
Image as background
By Java.child in forum AWT / SwingReplies: 2Last Post: 10-02-2008, 11:37 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks