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 7828369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:19:54+00:00 2026-06-02T10:19:54+00:00

i have to call one controller on the basis of first controller i have

  • 0

i have to call one controller on the basis of first controller i have to call another controller ……
but this is not working in spring 3 mvc……..

@Controller
public class ajaxContoller {
      @RequestMapping(value="/mmiFacade",method=RequestMethod.POST)
    public  @ResponseBody String mmiFacade(@RequestParam String sType){
                       String forwardName = "";          
        if (sType.equalsIgnoreCase("Pincode")) {

            forwardName = "forward:/pincodeAction";
        } else if (sType.equalsIgnoreCase("Locality")) {

            forwardName = "forward:/localityAction";
        } else if (sType.equalsIgnoreCase("Patient")) {

            forwardName = "forward:/patientAction";
        } else if (sType.equalsIgnoreCase("Dlhdata")) {

            forwardName = "forward:/Dlhdata";
        } 
           return forward;  

    }



    @RequestMapping(value="/pincodeAction",method=RequestMethod.POST)
    public @ResponseBody String ajax(){
            return "hiii";

    }
 @RequestMapping(value="/localityAction",method=RequestMethod.POST)
    public @ResponseBody String ajax1(){
            return "hiii1";

    }


}
  • 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-02T10:19:55+00:00Added an answer on June 2, 2026 at 10:19 am

    You should return modelandview object. view name starting with “forward:/” will do the job, otherwise Spring does not even try to interpret the response.
    Another option to implement a switch and to invoke other mapping as simple call to anther java function.

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

Sidebar

Related Questions

I have web application Project having RPC call. one RPC async is working fine.
I have a basic MVC 2 (RC2) site with one base-level controller (Home), and
i have trouble with calling one view controller to another view controller using segue
i have different different pages which i want to call from one controller action
I have one controller inheriting UITableViewController, and call the object as below editAlarm *ob
I have the following: public class BaseController : Controller { protected ISequenceService _sequence; public
I have written one controller class, in which i am writing one request mapping
I have a working zend mvc application that is using a layout, and this
I am doing a batch scripting assignment where I have to call one script
We have several Flash objects included in our project. We call each one a

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.