• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP MySql

 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic