This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat 6 with MS ACCESS JNDI Relative Path

 
James Camire
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to bundle a war file with a MS access database. Everything works great, except I can't figure out how to specify the MDB file using a relative path. This means a user will have to change the context.xml file to use it on another box. My goal is to allow a user to drop the war file onto any Tomcat app server and have it work without changes.

I've tried many variations and can't get it to work.

Thanks,

James

/META-INF/context.xml
<Context>

<Resource name="weather"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username=""
password=""
driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
url="jdbcdbcriver={Microsoft Access Driver (*.mdb)};DBQ=C:/Develop/webapp/MyProject/WebRoot/WEB-INF/database/weather.mdb;DriverID=22;READONLY=false}"/>

</Context>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic