Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

J2ee application and JNDI in a Servlet

 
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic