Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To retrieve data from the database

 
S.R.K.Vivek Raju
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I have a simple question, Can I retrieve data from the Mysql database on page load. i.e i am storing the information from page one and i want to retrieve that stored information on my page two. And this should be retrieved on page load.

Is this possible, if yes could anybody guide me with some tips.

Thanks

With Regards
S.R.K.Vivek Raju.
 
todd runstein
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you talking about web pages? If so, retrieve the data as page one is being created and store the results in a session attribute. You can simply write the data to the page for page one. For page two, have it simply pull out the data from the session attribute and write the data to the page.

If you're talking about using the "onload" attribute of the html body tag, you'd need to do this through javascript and XmlHttpRequest object. I guess I'm having trouble determining whether you mean "on page load" literally or not.

Hope that helps
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While JDBC is mentioned, this is really a question on how web pages work. Moving to Servlets.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic