Hmm. I will think about it and see what else I can do.

On Tue, Oct 15, 2013 at 5:54 PM, Dan Haywood
<[email protected]>wrote:

> No... Wicket is only used in the wicket viewer :-)
>
> You could have the same API in the dom, but you'd need a different
> implementation.
>
> I think the easiest thing might be to write a servlet filter to grab the
> httpservletrequest in all cases, and attach to a threadlocal for the
> duration of the call.  Then, your service implementation can just read from
> that threadlocal.
>
> This SO answer [1] might give you some clues.
>
> Dan
>
> [1]
>
> http://stackoverflow.com/questions/6217173/static-threadlocal-variable-in-a-webapp-are-there-any-security-performance-iss
>
>
> On 15 October 2013 17:36, james agada <[email protected]> wrote:
>
> > Will this also work for the RO viewer? I want to apply this to both
> wicket
> > viewer and the RO viewer
> >
> >
> > On Tue, Oct 15, 2013 at 5:07 PM, Dan Haywood
> > <[email protected]>wrote:
> >
> > > The raw information you want is available via Wicket APIs, eg [1]
> > >
> > > So, define an interface to this in your dom project, eg:
> > >
> > > public interface IWebUserService {
> > >     String currentIpAddress();
> > >     String currentBrowserAgent();
> > > }
> > >
> > > and write an implementation in the webapp project, leveraging said
> Wicket
> > > APIs.
> > >
> > > In your webapp project, register this new service.
> > >
> > > In your dom project, inject the service (via its interface type) into
> > your
> > > domain objects.
> > >
> > > HTH
> > > Dan
> > >
> > >
> > > [1]
> > >
> > >
> >
> http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/request/cycle/RequestCycle.html#get()
> > >
> > >
> > > On 15 October 2013 17:00, james agada <[email protected]> wrote:
> > >
> > > > I will like to automatically capture the client details - IP address,
> > > > Browser Agent of a client accessing my isis web app into an entity.
> Any
> > > > ideas?
> > > >
> > >
> >
>

Reply via email to