how to redirect a URL to a new browser window using sendRedirct(URL)?
I am using a Spring, where i try to response.redirect to a new window. i am not able do it. it just calls the urL in the same browser window. h开发者_StackOverflow社区ow do i make redirect to a new window..?
is there any other options to do that?
You can't do that server-side only.
You can make the request itself in a new window using the target
attribute of <a>
or <form>
:
<form target="_blank">..</form>
Or you can use ajax:
- request a resource
- return (print as response) the desired target url
- use
window.location.href = returnedUrl
精彩评论