• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNDI in webapps

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have JNDI working with my Oracle 9i database using my server.xml file in my local Tomcat 4.1.27. Now I need to put my webapp on the server and I wont get access or be able to touch server.xml on the server.

Please advise how I can get the JNDI to work without using server.xml. I tried putting the <context> info I had in server.xml into mywebappname root and call it mywebappname.xml and that didnt work. I also tried that with creating a context.xml and that didnt work. Both gave me back error message: Cannot create JDBC driver of class '' for connect URL 'null'

Is this something that can be done in Tomcat 4.1.27??

Here is what I have working in my server.xml that connects to Oracle databse with no problems:
server.xml(C:\jakarta-tomcat-4.1.27\conf)







web.xml




database connection part


[ November 08, 2007: Message edited by: Mike Jenkins ]
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can create a META-INF folder right beside WEB-INF, inside which you create context.xml then add your configuration there. when you deploy it to tomcat, the file will be found at CATALINA_HOME/config/[engine]/[host]/, I used this technique, it works for me.
reply
    Bookmark Topic Watch Topic
  • New Topic