In the morning, I already checked most of the answers to this problem ( There is no mapping found for the HTTP request with the URI .... in the DispatcherServlet with the name ), and also ( No mapping was found for the HTTP request with the URI [/ ChickenTest / index] in DispatcherServlet with the name "dispatcherServlet" ), but I still get "There is no mapping for the HTTP request with the URI [/ bmoa-surrounds / bmoa] in the DispatcherServlet with the name" bmoa "", so any help that should be appreciated:
POM:
<dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.8.5</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.2.6</version> </dependency> <dependency> <groupId>javax.xml</groupId> <artifactId>jaxb-impl</artifactId> <version>2.1</version> </dependency> </dependencies>
then my web.xml
<display-name>bmoa-surrounds</display-name> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/bmoa-servlet.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>bmoa</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>bmoa</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list>
my spring configuration file
<context:component-scan base-package="xxxx"/> <context:annotation-config/> <context:spring-configured/> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/"/> <property name="suffix" value=".jsp"/> </bean>
and finally my controller
@Controller public class BMOAServlet implements HttpRequestHandler { @RequestMapping("/bmoa-surrounds/bmoa") public void handleRequest(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { response.getWriter().write("result=" + handleIncomingMessage(request)); }
I call "http: // localhost: 8080 / bmoa-surrounds / bmoa? Juan = 9898", but I still don't get No matching found for the HTTP request with URI [/ bmoa-surrounds / bmoa] in a DispatcherServlet named "bmoa", any ideas? my env is java6 deployment in jboss
also sure beans are loaded beign, i got this in server log
12:34:06,671 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-5) Pre-instantiating singletons in org.s pringframework.beans.factory.support.DefaultListableBeanFactory@ 57ffa0: defining beans [BMOABussinesDelegate,properties,BMOAServlet,.........]; parent: org.s pringframework.beans.factory.support.DefaultListableBeanFactory@ 122d7c6
as well as this
12:34:06,753 INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] (MSC service thread 1-5) Mapped URL path [/bmoa-surrounds/bmoa] onto handler 'BMOAServlet' 12:34:06,754 INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] (MSC service thread 1-5) Mapped URL path [/bmoa-surrounds/bmoa.*] onto handler 'BMOAServlet' 12:34:06,755 INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] (MSC service thread 1-5) Mapped URL path [/bmoa-surrounds/bmoa/] onto handler 'BMOAServlet'
doesnt the latter mean that mappings are loading ?? please, help; (