swapna jhanjhar

Greenhorn
+ Follow
since Oct 03, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by swapna jhanjhar

Hi all,
I've attached the architecture of my project.
If I follow this arch, then each time i have have to connect to db and fetch a record which increases db hit count.
for eample i've to populate 3 dropdowns on page load from one table. But i've to select only the dsitinct values from db. for this i've to use 3 queries which selects from that column distinct values. Since there are 3 queries, as per my proj architechture i've to connect to db thrice.

This actually reducing my project's performance. Can someone please suggest me a suitable architechture which will reduce the db hit count.??
Please help...
I'm facing one strange problem. Donno the reason for the error.
I've one jsp page where I'm showing few values from db.
The servlet returns one resultset which has (say) name and id cols.
I've one hidden field and 2 textboxes.
if i'm doing in jsp page

it's throughing error that "no data found"

whereas

tis works fine..
From this it seems that we cant retrieve value from one RS column more than once.,...
can anyone please let me know the reason...and how can i achieve the same ???

Devaka Cooray wrote:

swapna jhanjhar wrote:Is there any other way to populate during page load?


You don't need to do it through JavaScripts as JavaScripts are running on the client side. The 'dynamic content' of a JSP is generated at the creation of that page at server side. Have a look at the JSP Tutorial, if you are new to JSP.

Devaka


Actually I want to create 3 dropdowns which will be populated on page load and i dont want to write the code in jsp, and want to use servlet.
can anyone please suggest the best way to do so?
13 years ago

swapna jhanjhar wrote:I need to populate the dropdown when the page loads from DB.
Is there any other way to populate during page load?

using servlets and with the same structure.
13 years ago
I need to populate the dropdown when the page loads from DB.
Is there any other way to populate during page load?
13 years ago
Vijitha can you show me some other method of getting the same result?
13 years ago
I need to populate the values in dropdown.
13 years ago
Though this is a simple requirement, but i dont know why this is not working. I have a jsp page where i need to show the values from database. I'm using servlet which will be referred to on page submit. On page load of the jsp page i'm calling a javascript function which is submitting the form. In servlet connection is created with database and the values are taken in a resultset.


This structure is working fine in other requirements. Please let me know why this code is not working. I'm getting error in the "while"statement inside the dropdown.
13 years ago