aspose file tools
The moose likes Servlets and the fly likes Question for experts? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Question for experts?" Watch "Question for experts?" New topic
Author

Question for experts?

Liz Cheyney
Greenhorn

Joined: Oct 29, 2002
Posts: 1
I was wondering if there is any way to send HTTP request to the servlet as a background process.
I should probably clarify what I mean:
I have web application with several tabs for entering data and a user can navigate between them without submitting the data in the servlet/EJB/DB. At some point of data entering process I want to execute a query but I want it to be transperent for the user. In particular, I don't want him to see how the page is refreshing and so on. Can I do it?
Thanks in advance
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12268
    
    1
I'm not sure if this is what you mean, but you can use JavaScript to send a request to a servlet, placing the response in an off-screen frame and then acting on that data with JavaScript. The screen the user is looking at is not affected.
Bill


Java Resources at www.wbrogden.com
Jesse Beaumont
Ranch Hand

Joined: May 30, 2002
Posts: 43
Yes you can but it gets a bit messier. The way to do it is to put your page in a two frame frameset. The first frame contains your page, the second frame is of size 0. When you want to do the invisible submit you submit the data via the second frame and include an onLoad event in the response which populates the data back into the first frame. The problem is that all your javascript get's that much messier because you are using frameset's but from the users perspective it is the neatest way to do it. The only other thing to keep in mind is that when the user actions a request like this there is no feedback to the user that an action has taken place.


---<br />Time flies like an arrow,<br />Fruit flies like a banana
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Question for experts?
 
Similar Threads
is it possible to make a servlet to a webservice?
Re: Servlet Navigation Problem
should I use transaction for this scenario ?
Bean or Servlet or JSP?
parsing in servlet