File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error: spring-servlet.xml

 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic