Two Laptop Bag*
The moose likes JDBC and the fly likes context file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "context file" Watch "context file" New topic
Author

context file

Hanna Bech
Greenhorn

Joined: Sep 10, 2008
Posts: 5
Hello,
I am using JSP with Derby on Netbeans, and I want to fix my context.xml file so I don't have to connect on each page idividually.
I'm not quite sure how to edit the context.xml file so that it specifies the url of my database location. Also, I'm not sure how I can open a database connection in my project pages without specifying the database url.
I know it might be a bit basic, but I'm used to php where I open and close database connections on each page individually.
A nudge in the right direction would be appreciated.

Thanks.
H
 
Consider Paul's rocket mass heater.
 
subject: context file
 
Similar Threads
JNDI in Servlets
JUnit Export connection setup failed: Need to specify class name
Connecting to more than one database in a connection pool
Problem with connection pooling
Reload JNDI resources when context.xml is changed