struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zoran Avtarovski <zo...@sparecreative.com>
Subject Re: Accessing ServerName property from request
Date Sun, 11 May 2008 01:30:56 GMT
Thanks Jeremy. That¹s all I wanted to confirm. I¹ve done it like that but I
just wanted to make sure I wasn¹t making problems for myself further down
the line.

Z.


> Zoran Avtarovski wrote:
>> > I need to access the getServerName method of the request from an action, >>
but
>> > I¹d like to do it via the request map. What parameter do pass the get
>> > method? I couldn¹t find anything on the site.
>> >
>> > Z.
>> >
>> >   
> 
> Hi Zoran, it's not in the request map. The RequestMap maps only to the
> attributes of HttpServletRequest
> (HttpServletRequest.getAttribute/setAttribute).  It doesn't provide a
> mapping to values from other methods of HttpServletRequest..
> 
> You will need to implement RequestAware instead.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message