You can also include tapestry-autowire.jar into your application and
have Tap automatically inject it by doing (no annotations necessary):
public abstract HttpServletRequest getServletRequest();
Also, the port is available on the request. Try getServerPort().
On 1/17/07, Lukas Ruetz <[EMAIL P
Hi!
in case you are working with java5+ you can inject the service
into your page by adding:
@InjectObject("service:tapestry.globals.HttpServletRequest")
public abstract HttpServletRequest getServletRequest();
you can retrieve the IP-address by:
String IP = getServletRequest().getRemoteAddr();
In Tap4, you can inject HttpServletRequest into a
service or page.
There is some note at the following.
http://lombok.demon.co.uk/tapestry4Demo/Inject.html
Shing
--- Chris Davies <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How is it possible to get the IP address and port of
> a visitor to a
> Page
Hi,
How is it possible to get the IP address and port of a visitor to a
Page? I've been trying to figure this out for quite a while now (so I
can insert useful information into log messages), but to no avail.
The closest (crummy) solution I've found is to use a deprecated
function to access the