Facing "server has failed to start" error

Viewed 34

I am working on a spring-mvc project to create a web application. For now I have created one web page. Followed below steps : 1. Created web.xml 2. Created spring dispather servelet 3. One JSP page to print a simple welcome message.

Facing this error "server has failed to start". I have tried : 1. to deleted snap file from "org.spring.resources" and deleted "temp" folder from "org.spring.wst". 2. deleted existing server and added new server. 3. to replace port of tomcat from 8080 to 8088. 4. in the file web.xml, tried to remove servlet mapping tag and servlet name tag.

But nothing has worked so far.

Please find used files as :

spring-dispacher-servlet file :

<beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:ctx="http://www.springframework.org/schema/context"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:cache="http://www.springframework.org/schema/cache"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd  http://www.springframework.org/schema/cache 
        http://www.springframework.org/schema/cache/spring-cache-3.2.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">

        <context:component-scan base-package="com.mrunal"/>
        <bean id="ViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">

            <property name="prefix">
                <value>/WEB-INF/pages/</value>
            </property>
            <property name="suffix">
                <value>.jsp</value>
            </property>
        </bean>
        </beans>

Web.xml file :

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>CommodityTrading12</display-name>
<servlet> 
<servlet-name>spring-dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.Dispatcherservlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>spring-dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
0 Answers
Related