开发者

spring MVC RedirectView [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and 开发者_Python百科 cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

return new ModelAndView(new RedirectView("login.htm"),"message","Your session has expired. Please login");

how do i get this message in login.jsp

<%request.getAttribute("message"); %>

${message}

any of above options didnt work


I guess since you're redirecting the model will not be available (redirect sends a 302 to browser and browser makes separate request for new page). but you can pass message as a URL parameter or store in the session.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜