Redirect
import java.net.URL;
import java.net.MalformedURLException;
import org.w3c.www.http.HTTP;
URL location = null;
try {
location = new URL("http://www.foobar.com/");
} catch (MalformedURLException ex) {
//nothing
}
reply.setStatus(HTTP.MOVED_PERMANENTLY);
reply.setLocation(location);