• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Datasource bean definition in applicationContext.xml

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am building a Spring MVC Web application. I have created applicationContext.xml file. I am trying to connect to mysql database. But when I define datasource bean in applicationContext.xml the tomcat server starts and it says `404- resource not found`.

If I remove all the beans from the applicationContext.xml the project runs properly.

What am I doing wrong? It is said that datasources should be defined in the applicationContext.xml but is there other way to define datasource?

Here is my applicationContext.xml file.

And this is my web.xml file


Can you please point out what am I doing wrong here?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic