java - No mapping found for HTTP request with URI [/webstore] -


i have problem when i'm trying run spring app on tomcat server. i'm getting error 404 in browser , in console:

2016-05-09 12:26:03,188 info org.hibernate.tool.hbm2ddl.schemaexport -  hhh000230: schema export complete 2016-05-09 12:26:05,082 info org.springframework.web.servlet.dispatcherservlet - frameworkservlet 'dispatcherservlet': initialization completed in 5685 ms 2016-05-09 12:26:05,121 warn org.springframework.web.servlet.pagenotfound - no mapping found http request uri [/webstore/] in dispatcherservlet name 'dispatcherservlet' 

this web.xml file:

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"         xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"         xsi:schemalocation="http://java.sun.com/xml/ns/javaee                               http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <filter>     <filter-name>encoding-filter</filter-name>     <filter-class>         org.springframework.web.filter.characterencodingfilter     </filter-class>     <init-param>         <param-name>encoding</param-name>         <param-value>utf-8</param-value>     </init-param>     <init-param>     <param-name>forceencoding</param-name>     <param-value>true</param-value>     </init-param> </filter>  <filter-mapping>     <filter-name>encoding-filter</filter-name>     <url-pattern>/*</url-pattern> </filter-mapping>  <servlet>     <servlet-name>dispatcherservlet</servlet-name>     <servlet-class>org.springframework.web.servlet.dispatcherservlet</servlet-class>     <init-param>         <param-name>contextconfiglocation</param-name>         <param-value>             /web-inf/spring/webcontext/dispatcherservlet-context.xml         </param-value>     </init-param> </servlet>  <servlet-mapping>     <servlet-name>dispatcherservlet</servlet-name>     <url-pattern>/</url-pattern> </servlet-mapping>  <context-param>     <param-name>contextconfiglocation</param-name>     <param-value> /web-inf/spring/webcontext/security-context.xml  

<listener>     <listener-class>         org.springframework.web.context.contextloaderlistener      </listener-class> </listener>  <filter> <filter-name>springsecurityfilterchain</filter-name> <filter-class>         org.springframework.web.filter.delegatingfilterproxy </filter-class> 

<filter-mapping>     <filter-name>springsecurityfilterchain</filter-name>     <url-pattern>/*</url-pattern> </filter-mapping>    </web-app> 

can me what's problem? it's strange, i'm not 1 works code, , have problem...

oh. , dispatcherservlet.xml looks that:

<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd     http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">   <import resource="classpath:spring/database-context.xml" />  <mvc:annotation-driven enable-matrix-variables="true">     <mvc:message-converters>         <bean             class="org.springframework.http.converter.json.mappingjackson2httpmessageconverter">             <property name="objectmapper" ref="jsonobjectmapper" />         </bean>     </mvc:message-converters> </mvc:annotation-driven>  <context:component-scan base-package="pl.spring.demo" />  <bean     class="org.springframework.web.servlet.view.internalresourceviewresolver">     <property name="prefix" value="/web-inf/views/" />     <property name="suffix" value=".jsp" /> </bean>  <bean id="messagesource"     class="org.springframework.context.support.resourcebundlemessagesource">     <property name="basename" value="messages" /> </bean>  <bean id="jsonobjectmapper"     class="org.springframework.http.converter.json.jackson2objectmapperfactorybean">     <property name="objectmapper">         <bean class="com.fasterxml.jackson.databind.objectmapper" />     </property> </bean> 

you need check in application server following points:

  • is there deployment error message?
  • the application has been deployed different context? (for example / instead of /webstore)
  • do have multiple copies of application server running 1 , trying deploy application in one?

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -