Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

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.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap