File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes JSP MySql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP MySql" Watch "JSP MySql" New topic


Vijay Vaddem
Ranch Hand

Joined: Feb 13, 2004
Posts: 243
Hi all....
i badly need a help.....the situation is like this....
i have a bean class and a jsp file...
im trying to access a table in MySql from the bean class and would like to
display the content in the JSP....
in the bean class, im using a Vector element to store the value and return..
in JSP, im using usebean tag to retrieve and display the value in a drop down list using select option.....but im unable to display the content...its
coming up..blank ....

Now, if i add a main method and invoke the same getXXX method of the bean in
the bean able to retrieve and display the results in the console......
Also, when i manually add some static data to the Vector in bean class and return....the JSP file is displaying the all the data perfectly......
hope ......some one will help me out from this situation...........
Thanx in advance......
[ February 13, 2004: Message edited by: Bear Bibeault ]
Winston Smith
Ranch Hand

Joined: Jun 06, 2003
Posts: 136
If you're not receiving any JSP runtime errors when the page loads, you may have trouble with your javascript (if any). Are you getting javascript errors on page load? Also, look carefully at the main method you wrote to test the Bean -- are you making the same method calls in the JSP? I know I've had Beans that work fine when tested idependently, but fail when I use them in the web environment. It inevitably turns out the I forget to make some key method calls in the JSP which initialize Bean attributes. Finally, post your JSP code so we can look at it.

for (int i = today; i < endOfTime; i++) { code(); }
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63857

Check the scopes in which you are storing and retrieving the bean. This is the most likely cause of "bean failure" (e.g. storing it in the session, but looking for it in page scope).

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: JSP MySql
It's not a secret anymore!