• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP MySql

 
Vijay Vaddem
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 class....im 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......
Vijay
[ February 13, 2004: Message edited by: Bear Bibeault ]
 
Winston Smith
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
WS
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic