wood burning stoves 2.0*
The moose likes Other Application Frameworks and the fly likes Error: spring-servlet.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Error: spring-servlet.xml" Watch "Error: spring-servlet.xml" New topic
Author

Error: spring-servlet.xml

JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
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.


SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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.


[My Blog]
All roads lead to JavaRanch
 
 
subject: Error: spring-servlet.xml
 
Similar Threads
Spring Tiles Integration
BeanDefinitionStoreException when running Spring web app
Including more than one controller having used it with sequence but error
Error with Transaction Interceptor
Unable to locate Spring NamespaceHandler for XML schema namespace