• Post Reply Bookmark Topic Watch Topic
  • New Topic

J2ee application and JNDI in a Servlet  RSS feed

 
Marco Lombardo
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I�m devoloping a simple j2ee application that must use only the following component:

-Serlvlet/JSP
-JNDI to access a database (SQLServer)

Is possible to have some samples about above � for example
How to access via JNDI to a connection of SQLServer in a servlet?

Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This covers Servlets and JNDI. Why must you use JNDI to get the connection?
 
Marco Lombardo
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think to obtain a datasource and after a connection.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah right - so you get the DataSource from JNDI and a Connection from that, rather than getting the connection directly from JNDI. That makes more sense. In which case the JDBC tutorial is a good place to start.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!