diff --git a/src/helma/framework/ResponseBean.java b/src/helma/framework/ResponseBean.java index b184f56d..c7fe73b5 100644 --- a/src/helma/framework/ResponseBean.java +++ b/src/helma/framework/ResponseBean.java @@ -73,6 +73,17 @@ public class ResponseBean implements Serializable { res.redirect(url); } + /** + * + * + * @param url ... + * + * @throws RedirectException ... + */ + public void forward(String url) throws RedirectException { + res.forward(url); + } + /** * */ diff --git a/src/helma/framework/ResponseTrans.java b/src/helma/framework/ResponseTrans.java index bc7fd86e..9751004a 100644 --- a/src/helma/framework/ResponseTrans.java +++ b/src/helma/framework/ResponseTrans.java @@ -66,6 +66,9 @@ public final class ResponseTrans implements Externalizable { // contains the redirect URL private String redir = null; + // the forward (internal redirect) URL + private String forward = null; + // the last-modified date, if it should be set in the response private long lastModified = -1; @@ -382,6 +385,27 @@ public final class ResponseTrans implements Externalizable { return redir; } + /** + * + * + * @param url ... + * + * @throws RedirectException ... + */ + public void forward(String url) throws RedirectException { + forward = url; + throw new RedirectException(url); + } + + /** + * + * + * @return ... + */ + public String getForward() { + return forward; + } + /** * Allow to directly set the byte array for the response. Calling this more than once will * overwrite the previous output. We take a generic object as parameter to be able to