Folks,
for posterity, I solved the problem using the request header fields.
1. the host header field is always guaranteed (according to the HTTP
spec http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23) to
exist.
2. The referer header field is always there because I'm handling a form
Howard,
yes, as I suspected, when I return a URL with http://localhost:8080 etc,
the jump to the struts page works. Unfortunately, the HttpServletRequest
object doesn't know the port (it thinks it's -1), and the localAddr is
the ip address as a number, not a symbolic address, and the remote
ad
Howard,
I tried the following:
HttpServletRequest req = getRequest();
String page = "http://"; + req.getLocalAddr() + ":8080/" +
req.getContextPath() + "/myStrutsPage.jsp";
return new URL(page);
But, that returned http://127.0.0.1:8080/myApp/myStrutsPage.jsp
You can return a URL no problem. The trick is to generate a proper
URL even when behind a firewall.
On Fri, Jan 2, 2009 at 9:51 AM, Jonathan O'Connor wrote:
> Hi,
> it must be too much Christmas cheer, but I am not sure how to jump to a
> non-Tapestry URL in the same web app.
>
> A little backgr
Hi,
it must be too much Christmas cheer, but I am not sure how to jump to a
non-Tapestry URL in the same web app.
A little background: We have an old application written in Struts 1.1. I
have written my own Login page, called the old code to the user
validation and updating of the session.
Th