| Author |
To retrieve data from the database
|
S.R.K.Vivek Raju
Ranch Hand
Joined: Sep 23, 2004
Posts: 58
|
|
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
Joined: Feb 15, 2005
Posts: 64
|
|
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
internet detective
Marshal
Joined: May 26, 2003
Posts: 26141
|
|
|
While JDBC is mentioned, this is really a question on how web pages work. Moving to Servlets.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: To retrieve data from the database
|
|
|