[jboss-user] [Beginners Corner] - Re: SQLException

PeterJ do-not-reply at jboss.com
Mon Feb 16 21:59:56 EST 2009


I copied your code into one of my projects. Of course I changed the database and table name to match something I had. And everything worked. One caveat: I did not use server-side script in a JSP - instead I placed the code in a servlet and passed the resulting string to the JSP which accessed if via EL.

A few suggestions.

1) Do not call the datasource DefaultDS. Your other post that used MyDS is better.
2) Do not remove hsqldb-ds.xml - the DefaultDS is needed by several JBoss AS services. (You can replace it, but it takes some work. Ch15 of JBoss in Action provides the details)
3) Do what I did - put your code in a servlet, pass the string to the JSP and use EL. Not mandatory, but saner.

Here is a recap of everything you have to do, starting with a fresh install of JBoss AS 5.0.0.GA:

1) Copy the mysql JDBC JAR file to server/default/lib
2) Copy your mysql-ds.xml file to server/default/deploy
3) Copy your WAR file to server/default/deploy
4) Start the app server and access the JSP

Good luck.

And please do not spam the forums any more.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210563#4210563

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210563



More information about the jboss-user mailing list