문제

I am submitting a form in jsp. After running the underlying logic spring mvc returns view.

There are 2 conditions. i.e.

if(condition1){
    mav = new ModelAndView("jspPageName1");
    return mav;
}else{
    mav = new ModelAndView("jspPageName2");
    return mav;
}

I want jspPageName1 to be open in a new tab and jspPageName2 will be opened in the same tab.

도움이 되었습니까?

해결책

If you are referring to browser tabs it can't be done from Spring.

You can on a link level specify <a href="#" target="_blank"/> to trigger a link opening in a new tab/window. Remember though, a users local browser configuration always has precedence of any server settings.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top