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

  • SEARCH
  • Home
  • 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 7711777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:27:43+00:00 2026-06-01T01:27:43+00:00

First, a bit of context: web.xml: I match all /app/* requests to my dispatcher:

  • 0

First, a bit of context:

web.xml:

I match all /app/* requests to my dispatcher:

<servlet>
    <servlet-name>dispatcher</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>dispatcher</servlet-name>
    <url-pattern>/app/*</url-pattern>
</servlet-mapping>

My question, why does calling /app/import/view work when returning String:

Controller:

public class ImportController extends MultiActionController {

    public String view(HttpServletRequest request, HttpServletResponse response) throws Exception
        return "importer.home";
    }

but NOT when returning ModelAndView:

public class ImportController extends MultiActionController {

    public ModelAndView view(HttpServletRequest request, HttpServletResponse response) throws Exception {
        ModelAndView mav = new ModelAndView("importer.home");
        mav.addObject(new ExlFile());
        return mav;
    }

Is there a different naming convention if we use ModelAndView?

  • 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-06-01T01:27:45+00:00Added an answer on June 1, 2026 at 1:27 am

    You’re using MultiActionController, which has very strict constraints on method naming conventions and signatures.

    However, you shouldn’t be using MultiActionController at all, it’s obsolete and deprecated. Write controllers as described in the Spring manual, i.e. using @Controller and @RequestMapping, then you get much more flexible method signatures.

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

Sidebar

Related Questions

A bit of context is probably necessary first, Basically I've been using the VS2008
I'm doing the first bit of web-page development I've done in years, in VS2008,
First of all I am new to python and a bit rusty on .NET
To first give a little bit of context, my use-case is that my partner
First, a bit of context: I'm trying to implement a URL shortening on my
This first bit works: $my_id = 617; $post_id_7 = get_post($my_id); $title = $post_id_7->post_excerpt; echo
I understand that the first bit is the sign and that the next 8
I'm working on my first object oriented bit of python and I have the
first sorry if its a stupid question but im lost a bit. So when
My first post here :) I have a summer job doing a bit of

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.