advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Download the code for this article
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 3.2/5 | Rate this item | 17 users have rated this item.
 

iFrames + JSP = Enhanced Web Content Retrieval

Used with JavaScript and JSP code, iFrames elegantly resolve the "hang" issue that occurs when a Web application fetches values from the server. 


advertisement
recently built a Web application with JavaServer Pages (JSP) and Servlets for a client. While testing the application, the client discovered a page that required her to press a button to retrieve values from the server before other fields in the page would populate. She wanted me to eliminate the "hang" that occurred when she pressed the button (i.e., submitted the page to the server), so that she could populate other fields while the application fetched values from the server.


This is a common scenario: a Web application fetches some data from the server based on user input before populating the rest of the fields in a Web page. Usually, an application submits the page to the server, which then returns the requested information back to the page. Users don't like waiting until the page refreshes with the fetched data, and developers must perform additional coding for the application to maintain any populated fields when fetching data from the server based on user input.

This 10-Minute Solution demonstrates how to use inline frames (iFrames) as a means of submitting and receiving values from the server side. Used with JavaScript and JSP code, iFrames elegantly resolve the "hang" issue, thus enhancing the user experience and reducing the required coding. This tutorial presents this technique via a simple user registration application, which consists of a registration page, a Servlet to process requests, and another JSP page that is included in an iFrame.



How do I make a Web application fetch data from the server when a user submits input—without hanging and while maintaining populated fields on a page?



Use iFrames as a means of submitting and receiving values from the Web server. Used with JavaScript and JSP code, iFrames elegantly resolve the "hang" issue.

  Next Page: The iFrame Solution


Page 1: IntroductionPage 3: Installing and Running the Sample
Page 2: The iFrame SolutionPage 4: iFrames in the Real World
Please rate this item (5=best)
 1  2  3  4  5
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs