I took a course on Spring 2.56 from Interface21 and the labs I got get it to work during the training.

But when I tried it at home it doesn't work.
I go to the following url and it's find.

It display "This is my JSP page. " This is from the default index.jsp page.
When I tried the url as suggested in the lab "localhost:8080/accounts/accountSummary.htm"

It gives me a 404 error.

Note, the Tomcat 6 console didnot show any errors meaning it didn't invoke the code for the url.
I am using Myeclipse 8 on Tomcat6.
Here is my Spring information:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- Beans in these files will makeup the configuration of the root web application context -->

<!-- Bootstraps the root web application context before servlet initialization -->
<listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>

<!-- Deploys the 'accounts' dispatcher servlet whose configuration resides in /WEB-INF/accounts-servlet-config.xml -->
<servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>

<!-- Maps all /accounts URLs to the 'accounts' servlet -->


<?xml version="1.0" encoding="UTF-8"?>

The configuration for your 'accounts' Dispatcher Servlet.

This example uses component scanning to automatically
pick up controllers.
- Dependencies of controllers are wired using @Autowired support.
- The URI scheme is controller using @RequestMapping annotations

<context:component-scan base-package="accounts.web"/>

if you would not have used component scanning you would have had
to wire up the controller yourself:

<bean class="accounts.web.AccountController">
<constructor-arg ref="accountManager"/>

<bean class="org.springframework.web.servlet.view.Intern alResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/"/>
<property name="suffix" value=".jsp"/>



<!-- The configuration of the account manager application. -->


<!-- Weaves in transactional advice around @Transactional methods -->
<tx:annotation-driven transaction-manager="transactionManager" />

<!-- The account manager service that can load accounts from the database -->
<bean id="accountManager" class="accounts.internal.HibernateAccountManager">
<constructor-arg ref="sessionFactory" />

<!-- A Hibernate SessionFactory for mapping Accounts and Restaurants from object to relation tables -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSes sionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingLocations">

<!-- Creates an in-memory "rewards" database populated with test data for fast testing -->
<bean id="dataSource" class="accounts.testdb.TestDataSourceFactory">
<property name="testDatabaseName" value="rewards"/>
<property name="schemaLocation" value="classpath:accounts/testdb/schema.sql"/>
<property name="testDataLocation" value="classpath:accounts/testdb/test-data.sql"/>

<!-- Drives transactions using Hibernate APIs when requested -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.Hibernat eTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />

<!-- Translates Hibernate exceptions to Spring Data Access Exceptions -->
<bean class="org.springframework.dao.annotation.Persiste nceExceptionTranslationPostProcessor"/>


Here is the AccountControler.java:
package accounts.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autow ired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.ServletRequestBinding Exception;
import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.web.bind.annotation.RequestMap ping;
import org.springframework.web.servlet.ModelAndView;

import accounts.Account;
import accounts.AccountManager;

* A Spring MVC @Controller controller handling requests for both the
* account summary and the account details pages. The accountDetails()
* method return an account, corresponding to a given entity id. The
* accountSummary() method returns a list with all accounts.
public class AccountController {

private AccountManager accountManager;

* Creates a new AccountController with a given account manager.
@Autowired public AccountController(AccountManager accountManager) {
this.accountManager = accountManager;

* The @RequestMapping annotation takes care of setting the URL
* this controller will react this.
public ModelAndView accountDetails(HttpServletRequest request)
throws ServletRequestBindingException {
long id = ServletRequestUtils.getRequiredLongParameter(reque st, "entityId");
ModelAndView mav = new ModelAndView("accountDetails");
mav.addObject("account", accountManager.getAccount(id));
return mav;

public ModelAndView accountSummary() {
List<Account> accounts = accountManager.getAllAccounts();
ModelAndView mav = new ModelAndView();
mav.addObject("accounts", accounts);
return mav;

The database is hsqldb.

Any help or hint would be greatly appreciated it.