Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

page

 
sudhakar ananth
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey friends
how can i get values from database to Java servlet page while it is loading itself

i mean
when the .jsp page will be loaded(displayed on the brower)it should be having the values from database

Ex: <html:select....>

this drop dowm list should have the values from the database wen the page is displayed.

Thanks for you help friends
 
Rao Raghu
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should make use of the JDBC here. Write the DB code in your jsp and you have the values you want in your jsp.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by rao raghu:
Write the DB code in your jsp ...


The experienced programmers would advise against coding database access in a JSP. It's a poor programming structure to employ.

Please read this article.
[ February 05, 2007: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sudhakar ananth, surely you could have come up with a better topic title than "page". Please read this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic