Note that there are some explanatory texts on larger screens.

plurals
  1. POSpring MVC and Weblogic integration
    text
    copied!<p>I get this error whenever I try to view my tutorial app in the browser</p> <blockquote> <p>WARNING: No mapping found for HTTP request with URI [/HelloWorld.Web] in DispatcherServlet with name 'dispatcher'</p> </blockquote> <p>That just means the request is being received by the dispatcher servlet but it can't forward it to a controller.</p> <p>But I can't seem to know where the problem is. I think I've mapped this correctly:</p> <pre><code>&lt;bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"&gt; &lt;property name="mappings"&gt; &lt;props&gt; &lt;prop key="/HelloWorld.Web"&gt;indexController&lt;/prop&gt; &lt;/props&gt; &lt;/property&gt; &lt;/bean&gt; &lt;bean id="indexController" class="com.helloworld.controller.IndexController"&gt; &lt;property name="artistDao" ref="artistDao"/&gt; &lt;property name="methodNameResolver"&gt; &lt;bean class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver"&gt; &lt;property name="alwaysUseFullPath" value="true"/&gt; &lt;property name="mappings"&gt; &lt;props&gt; &lt;prop key="/HelloWorld.Web"&gt;getAllArtists&lt;/prop&gt; &lt;/props&gt; &lt;/property&gt; &lt;/bean&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>I am using Spring 2.5.6 and Bea Weblogic Server 9.2 </p> <p>Here's my web.xml</p> <pre><code>&lt;web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt; &lt;servlet&gt; &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt; &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt; &lt;url-pattern&gt;/&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;/web-app&gt; </code></pre> <p>Here's the IndexController</p> <pre><code>public class IndexController extends MultiActionController { private ArtistDao artistsDao; public ModelAndView getAllArtists(HttpServletRequest request, HttpServletResponse response) throws SQLException{ ModelAndView mav = new ModelAndView(); mav.setViewName("index"); List&lt;Artist&gt; artists = artistsDao.getAll(); mav.addObject("artists", artists); return mav; } public void setArtistsDao(ArtistDao artistsDao) { this.artistsDao = artistsDao; } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload