aspose file tools*
The moose likes Spring and the fly likes URL after return modelView or through Redirect didnt change Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "URL after return modelView or through Redirect didnt change" Watch "URL after return modelView or through Redirect didnt change" New topic
Author

URL after return modelView or through Redirect didnt change

vikka sharma
Greenhorn

Joined: Jan 27, 2011
Posts: 3

i have a login.jsp through which i am calling the controller using annotation <form:form action="/ProjectName/loginCheckAfterSubmit.do" id="loginForm1" method="POST" commandName="userInfo"/>

and in controller

@RequestMapping("/ProjectName/loginCheckAfterSubmit.do")
public String showAdminForm( @ModelAttribute("userInfo") User userInfo, BindingResult result, HttpServletRequest request, HttpServletResponse response )
{
try
{

// Some Stuff//
return new ModelAndView("admin"); //For calling admin.jsp which is in WEB-INF/jsp/ folder
//return "redirect:admin.jsp"; // This is also not working
}

}
catch( Exception e )
{
logger.error("Stack : ", e);
e.printStackTrace();
}
return "redirect:postProductsForm.htm";
}

So my problem is after login it went to admin.jsp thr URL http://localhost:8080/CorporateGovrnance/loginCheckAfterSubmit.do
But i want http://localhost:8080/CorporateGovrnance/admin.jsp

What i did wrong ... plwase help me.
thanks

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URL after return modelView or through Redirect didnt change
 
Similar Threads
Java Script in JSP page
My jsp file is not displayed - tomcat does not pick up the class file
Regarding preconfigured tomcat 6.0.16.
controller don't display view
how to redirect to success page in tomcat using its lapd configuration