Getting error-404 in tomcat while running application from eclipse

450 views Asked by At

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>
1

There are 1 answers

2
Saif Asif On

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.