0

I am trying to run a spring3 application from the eclipse(indigo) by using tomcat6.0. Right click on the project -> run on server -> gives me error 404(The requested source is not available).

Edit from comments

<!-- Dispatcher Servlet Mapping --> 
<servlet>   
  <servlet-name>SNBServlet</servlet-name>
  <servlet-class>org.springfr‌​amework.web.servlet.DispatcherServlet</servlet-class>
  <load-on-startup>1</load-on-‌​startup>
</servlet>
<servlet-mapping>
  <servlet-name>SNBServlet</servlet-name>
  <url-pattern>/</url-pattern>
</servlet-mapping>
<listener>
  <listener-class>org.springframework.web.util.Log4jC‌​onfigListener</listener-class>
</listener> 
<!-- Welcome File --> 
<welcome-file-list>
  <welcome-file>index.jsp</welcome-file>
</welcome-file-list>
Nicktar
  • 5,548
  • 1
  • 28
  • 43
user1662039
  • 319
  • 1
  • 2
  • 16
  • Next time , edit your post and put valuable information there instead of pasting it in the comments. I edited your post for you – Saif Asif Dec 04 '13 at 12:56

1 Answers1

0

Check the URL that is being hit in the browser. Most probably it will be something like http://somehost:port/yourApplicationContext/ which means it is attempting to access a resource on the root of the application that is not present or configured by you.

Either configure some welcome-file in the deployment descriptor of the application or simply request a resource that is already present.

Saif Asif
  • 5,516
  • 3
  • 31
  • 48
  • I cannot see your web.xml. Kindly attach it in your post – Saif Asif Dec 04 '13 at 11:38
  • Looking at your web.xml, you have a servlet mapped for (slash) "/". So in all cases your servlet will be called which is the spring dispatcher servlet. You will have some other controllers defined in the application. You will have to check those URLs and hit that resource – Saif Asif Dec 04 '13 at 13:09