Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6023545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:01:17+00:00 2026-05-23T04:01:17+00:00

I have a user controller. It has three methods for listing users, showing a

  • 0

I have a user controller. It has three methods for listing users, showing a user add page and saving a user. When the user is saved, it should redirect to the user listing page.

In my case when I try to do the redirect, I am getting the following error.

No mapping found for HTTP request with URI [/myApp/cases/cases] in DispatcherServlet

Below is my entire UserController.

@Controller

@RequestMapping("/users")

public class UserController extends BaseController {

    private static Logger logger = Logger.getLogger(userController.class);

    @RequestMapping(method = RequestMethod.GET)
    public ModelAndView list() {
        logger.info(" [list] - showing user list.");
        ModelAndView mav = new ModelAndView("userList");
        mav.addObject("users", new ArrayList<User>());
        return mav;
    }

    @RequestMapping(value = "/new", method = RequestMethod.GET)
    public ModelAndView form() {
        logger.info(" [form] - showing new user creation form.");
        ModelAndView mav = new ModelAndView("userForm");
        mav.addObject("user", new User());
        return mav;
    }

    @RequestMapping(method = RequestMethod.POST)
    public String save(User user) {
        logger.info(" [save] - saving user.");

        return "redirect:/users";
    }
}

Am I doing the redirection proper way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:01:17+00:00Added an answer on May 23, 2026 at 4:01 am

    Add the context of DispatrcherServlet. For example, if URL pattern of dispatcher servlet (in web.xml) is ‘myApp’ then it should be: return "redirect:/myApp/users";

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following route: {language}/{controller}.mvc/{action}/{id} Once a user has choosen the language it
I am using the Zend Framework. I have a controller named 'UserController' that has
I have a controller which has a method called history class UsersController < ApplicationController
I have a controller user with a method login For some reason, when I
I have a controller action that checks this.User.Identity.IsAuthenticated What do you suggest how to
I have user control named DateTimeUC which has two textboxes on its markup: <asp:TextBox
I have a controller with two simple Methods: UserController Methods: [AcceptVerbs(HttpVerbs.Get)] public ActionResult Details(string
I have a model Token with three fields user_id,product_id and unique_token .In the controller
I do have my own Controller in Magento, that has been done by following
I have three models ( User , Tag , Product ) and they interact

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.