RSS Forums RSS
Please support our JSP advertiser: Lunarpages JSP Web Hosting

how to access the database within same jsp page

Join Date: Apr 2006
Posts: 3
Reputation: cpweb is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cpweb cpweb is offline Offline
Newbie Poster

Re: how to access the database within same jsp page

  #3  
Apr 21st, 2006
you could also break the page into two pages.Basically, you could have the page call itself. Like if you wanted to insert username and password into your database, you could do this (this is just sample code)if (theQueryNotComplete){ Do the code for the 1st logical page. With the two elements on them.}else{ And have the info past to the database. now process info and place output.}Now in the if part, place a form/anchor that will point to the same page, this way the info is past to the current page, and it seems as if the page has gone to another, however it really stays on the same page.Even with this it may not seem as practical as above because it will still load, the other alternative is learning AJAX.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:50 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC