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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:15:13+00:00 2026-05-22T23:15:13+00:00

I coded a wee login controller. It has an onSubmit method which logs in

  • 0

I coded a wee login controller. It has an onSubmit method which logs in the user. If the login is successful I want to show the front page without having to redirect. The front page needs content from some other model. Because my LoginController already has a LoginModel it can’t also have the InformationModel.

Is there some way to get a pointer on the InformationModel? Or some call to get the ModelAndView of the InformationController? That controller provides a handleRequest method.

I think this is more a fundamental question, but if you need code to answer it I will supply it.

  • 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-22T23:15:14+00:00Added an answer on May 22, 2026 at 11:15 pm

    I’,m not sure if I get your question correctly, but

    a.) You can add multiple models on your ModelAndView object. Use:

     modelAndView.addObject("informationModel", informationModelObject);
    

    b.) If successful login, set the view to your front page view:

     modelAndView.setView("frontPageView");
    

    To access your InformationController on your LoginController, you can autowire it =)

    @Autowired
    InformationController informationController;
    
        @RequestMapping( ... ) // assuming you define it here
        public ModelAndView onSubmit(... ) {
          // .. code here
    
          if (loginsuccess) {
              InformationModel informationModelObject = informationController.handleRequest(...);
               modelAndView.addObject("informationModel", informationModelObject);
              modelAndView.setView("frontPageView");
          }
          else {
             modelAndView.setView("loginFailView");
          }
    
          return modelAndView;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From coded detailView of my app which has a grouped table view. I want
A wee while ago I ended up on a page which hosted several ruby
I coded a mpi matrix multification program, which use scanf(%d, &size) , designate matrix
I've coded some smaller projects using Silverlight 2.0, which is fairly impressive. Does Silverlight
A designer coded an html template using CSS best practices. I want to use
I coded a php page that displays information from a mysql database neatly into
I've coded this small snippet to show what I'm not understanding: <?xml version=1.0 encoding=utf-8?>
I have coded an implementation of IWorkspaceExtension (along with IWorkspaceExtensionControl, which declares the Init
Never coded for XML before, totally lost with the various primers which all tell
I Have coded a terms and conditions page with numbered paragraphs as follows: <p>1.

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.