• 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

Error: spring-servlet.xml

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to spring. using spring 2.0. I am trying a simple example using spring MVC. I get the following error:



I have spring.jar in my WEB-INF/lib.
My web.xml looks like -



My springapp-servlet.xml looks like -



What could be the reason for this error?
Also, I have not specified the path of springapp-servlet.xml. How does the application know where to look for mappings of a specific type.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Replace springapp-servlet.xml's header with this :



Also, I have not specified the path of springapp-servlet.xml. How does the application know where to look for mappings of a specific type.


Spring looks for [servletname]-servlet.xml under WEB-INF, where [servletname] is the name you give to the DispatcherServlet. You named the DispatcherServlet "springapp", Spring will look for springapp-servlet.xml under WEB-INF.
 
And then we all jump out and yell "surprise! we got you this tiny ad!"
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic