File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to connect mysql database with struts application through jndi

 
Satchidananda Mohanty
Ranch Hand
Posts: 78
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could you say me how to connect the mysql database from a struts application through jndi process.

I have used these steps..



in my action class i have used



after deploying this i got this error

javax.servlet.ServletException: javax.naming.NameNotFoundException: mydatabase not found

SO i have checked with driver file,context.xml file.
I saw this from http://wiki.metawerx.net/wiki/JNDIDBCPExampleForMySQL5.x

If you get a javax.naming.NameNotFoundException error, you have either not installed the context.xml file correctly, or have used a different name in the context.xml <Resource> element's "name" attribute to what you are using in your Context.lookup() call.

I think some more configuration is requird to use the context.xml file..

can anybody help me regarding this..


Thanks in advance..
zeet

 
Campbell Ritchie
Sheriff
Pie
Posts: 47274
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Posted in wrong forum. Moving thread.
 
Sagar Rohankar
Ranch Hand
Posts: 2905
1
Java Spring Ubuntu
 
Satchidananda Mohanty
Ranch Hand
Posts: 78
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Sagar,
I am going through that..
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's certainly not a Struts question. Moving to Tomcat for now.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic