Yay! An Emacs person!
I love emacs. When I open it, a few quick C-x C-f, or maybe M-x make-directory, followed by a C-x 3 and flipping with C-x o, is just so... smooth. I hate using the mouse.
That said, for Java stuff--no way; I used to use the JDE, as recently as a few years ago. Found myself going to it less and less for Java work, now essentially never. There are just too many tools available in the IDEs. (And, sadly, I find its Lisp no longer suits my Lisp preferences :(
I like netbeans, but I was following a tutorial found here
http://netbeans.org/kb/docs/web/quickstart-webapps.html and part way through it, I found i was clicking things, and not having a clue what I was doing.
That aside, you didn't TellTheDetails, so it's impossible to help: how are you trying to do it? Are you trying to configure a datasource?
Yeah, sorry, that is probably the worst post I've made in any forum, it was too general. I'm getting to that in a bit.
Are you just trying to use the driver directly? What database?
Apache Derby. How do you mean,
use the driver directly? You mean hard coding everything in a servlet?
Database access should be safely ensconced in a business layer that has nothing at all to do with the UI (e.g. Servlets and Tomcat et al). If you are looking for an ORM tool, Hibernate is a popular choice. There are others. If you want to roll your own, learn about JDBC
Could you expand on this a bit? When you say roll your own, I just thought that JDBC was the api to interact with the vendor driver for your database? Is hibernate an alternative way of doing it? And yeah, I wasn't going to hard-code the servlet, I just didn't know the best place to put my post :)
Right.
I think my first specific question has to be about this paragraph in the tomcat link in David's post.
Next, modify the web application deployment descriptor (/WEB-INF/web.xml) to declare the JNDI name under which you will look up preconfigured data source. By convention, all such names should resolve to the jdbc subcontext (relative to the standard java:comp/env naming context that is the root of all provided resource factories. A typical web.xml entry might look like this:
As I understand it, JNDI is like a shop assistant, showing the customers (the server and the web app) the way to the
fruit aisle (the database), going past different food on the way (different resources). Is that about right?
Now when they say data source, what do they mean? What is its purpose? Also, I don't understand the text in green. Can someone err... thickify it for me? :)
Now, this is in the web.xml, and uses JNDC (I think.)
In this, the only thing I need to change is the text in red. Yes? All the rest does is to say to the application, hey, when I want an instance of the Connection class, the class methods I use are with a DataSource object, and that is jdbc/myDatabaseName.
What directory does the database need to be in at this point? Or will the application know where it is because you copy the driver in to the /lib folder of the server?