Meaningless Drivel is fun!*
The moose likes Spring and the fly likes No mapping found for HTTP request with URI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "No mapping found for HTTP request with URI " Watch "No mapping found for HTTP request with URI " New topic
Author

No mapping found for HTTP request with URI

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 208
HI with spring 3.1.2, JBOSS 7.1.1 and JSP, I created a .ear file. when I navigated to the "home.jsp" page, jboss thrown the following error:

00:08:38,402 INFO [org.springframework.web.servlet.DispatcherServlet] (MSC service thread 1-4) FrameworkServlet 'dispatcherServlet': initialization completed in 347 ms
00:08:38,404 INFO [org.jboss.web] (MSC service thread 1-4) JBAS018210: Registering web context: /DeliveriesManager-web
00:08:38,419 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "DeliveriesManager-ear-1.0.ear"
00:08:45,339 WARN [org.springframework.web.servlet.PageNotFound] (http-portal.ixsystems.com.au-192.168.1.20-8080-1) No mapping found for HTTP request with URI [/DeliveriesManager-web/] in DispatcherServlet with name 'dispatcherServlet'


here is my web.xml file:



servlet-context.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">

<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->

<!-- Enables the Spring MVC @Controller programming model -->
<annotation-driven />

<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />

<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>

<context:component-scan base-package="deliveries.maanger.controller" />
</beans:beans>


home.jsp:



DeliveriesController.java:



What might be the cause of the error in my project setup?
Very appreciate for any suggestion and help.
Thanks
Sam
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

is this really the name of the package your controllers are in? It looks mispelled.




[How To Ask Questions][Read before you PM me]
sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 208
Thank you for your suggestion. I fixed that error. Now the application can open its home page, but failed to read css/style.css file.
That is when user open its first page here:
http://122.106.189.123:8080/DeliveriesManager-web/
then click the button "Add Delivery", it opens "addDeliveries.jsp" in a new window. Noticed that the page is without css which is supposed to be styled by style.css.
The style.css link is failed to read as well:

http://122.106.189.123:8080/DeliveriesManager-web/resources/css/styles.css

Any thing wrong with my project setup?

Thanks
Sam
sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 208
I have to fall back to Spring 3.0.4.RELEASE to resolve this error.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No mapping found for HTTP request with URI
 
Similar Threads
can't find css, images and js static files
STS springMVC project how to run on tomcat application
No unique bean of type [javax.persistence.EntityManagerFactory] is defined: expected single bean but
No mapping found for HTTP request with URI [/springmvc/login.do] in DispatcherServlet
WARN [org.springframework.web.servlet.PageNotFound]No mapping found for HTTP request, error-code404