JSF 内から 301 リダイレクトを実装しようとしていますが、firebug を実行すると、常に 302 が実行されます。以下の方法を変更して 301 を達成する方法を教えてもらえますか?
/**
* Redirect to specified destination url
*
* @param destination
*/
public static void permanentRedirect(String destination) {
final ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
try {
HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
if (!response.isCommitted()) {
externalContext.redirect(destination);
}
} catch (IOException e) {
LOGGER.debug("Could not redirect to " + destination);
}
}