aspose file tools*
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 Soft Skills this week in the Jobs Discussion 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: 14688
    
  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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error: spring-servlet.xml