This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JSP and the fly likes Page loading issue in Index page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Page loading issue in Index page" Watch "Page loading issue in Index page" New topic

Page loading issue in Index page

Kannan BLR

Joined: Mar 01, 2005
Posts: 10

In Index.jsp, Iam retrieving the datas from Database & put them to combo box. taking more time to load the page because of retrieving those data from DB. that is problem now.

Code is,
<TD width="120" class="text">
<input type="radio" name="find" value="ip"/>Industry Partner
<td width="200">
<select style="width:266px" class="text" name="ipopt">

<option value="">--Select One--</option>

UserMaster um1=new UserMaster();
ArrayList a2=new ArrayList();

for(int i=0;i<a2.size();i++)
String ipcode=(String)a2.get(i);
Industry ip=new Industry();

<OPTION value="<%=ipcode%>">


what is my question is, Data should fetch from DB when i click radio button else combo box should be showing only ---Select One---.
If it's happened, load performane is good.
Please give the suggestion to me.

Kannan.A<br />
K Kiran Kumar
Ranch Hand

Joined: Jan 04, 2006
Posts: 109
You can call a javascript using onclick() or onchange() or selected() methods by passing some variable(like getFromDB=y). After calling your JS method, call the same page and check for the variable that you have set. Then you can connect to dbase...
I agree. Here's the link:
subject: Page loading issue in Index page
It's not a secret anymore!