Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URL after return modelView or through Redirect didnt change  RSS feed

vikka sharma
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

and in controller

public String showAdminForm( @ModelAttribute("userInfo") User userInfo, BindingResult result, HttpServletRequest request, HttpServletResponse response )

// 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);
return "redirect:postProductsForm.htm";

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

What i did wrong ... plwase help me.

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!