You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andy <an...@hotmail.com> on 2009/05/01 19:36:51 UTC

determine if iphone user?

Hi, is there an easy way to tell in an s2 action if the request is coming from an iphone/mobile device?

Thanks!

_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009

Re: determine if iphone user?

Posted by Bhaarat Sharma <bh...@gmail.com>.
your action can Implement ServletRequestAware
because of the implementation you will have to override setServletRequest
method which will set a HttpServletRequest member in your class

On Fri, May 1, 2009 at 2:22 PM, Andy <an...@hotmail.com> wrote:

>
> Cool, so is there a way to add a getter/setter in my action class to
> automatically pick up the request header, similar to parameters?
>
>
>
> > Date: Fri, 1 May 2009 15:29:03 -0230
> > Subject: Re: determine if iphone user?
> > From: richardsayre@gmail.com
> > To: user@struts.apache.org
> >
> > I think the HTTP_USER_AGENT header should be similar to:
> >
> > Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+
> > (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3
> >
> > If a request comes from the IPhone browser
> >
> > On Fri, May 1, 2009 at 3:06 PM, Andy <an...@hotmail.com> wrote:
> > >
> > > Hi, is there an easy way to tell in an s2 action if the request is
> coming from an iphone/mobile device?
> > >
> > > Thanks!
> > >
> > > _________________________________________________________________
> > > Insert movie times and more without leaving Hotmail®.
> > >
> http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>
> _________________________________________________________________
> Hotmail® has a new way to see what's up with your friends.
>
> http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
>

Re: determine if iphone user?

Posted by Zoran Avtarovski <zo...@sparecreative.com>.
If iPhone users are significant enough you¹re better off with an interceptor
to check all incoming requests.

Z.
> 
> 
> Cool, so is there a way to add a getter/setter in my action class to
> automatically pick up the request header, similar to parameters?
> 
> 
> 
>> > Date: Fri, 1 May 2009 15:29:03 -0230
>> > Subject: Re: determine if iphone user?
>> > From: richardsayre@gmail.com
>> > To: user@struts.apache.org
>> > 
>> > I think the HTTP_USER_AGENT header should be similar to:
>> > 
>> > Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+
>> > (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3
>> > 
>> > If a request comes from the IPhone browser
>> > 
>> > On Fri, May 1, 2009 at 3:06 PM, Andy <an...@hotmail.com> wrote:
>>> > >
>>> > > Hi, is there an easy way to tell in an s2 action if the request is
>>> coming from an iphone/mobile device?
>>> > >
>>> > > Thanks!
>>> > >
>>> > > _________________________________________________________________
>>> > > Insert movie times and more without leaving Hotmail®.
>>> > > 
>>> http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutori
>>> al_QuickAdd1_052009
>> > 
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> > 
> 
> _________________________________________________________________
> Hotmail® has a new way to see what's up with your friends.
> http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial
> _WhatsNew1_052009



RE: determine if iphone user?

Posted by Andy <an...@hotmail.com>.
Cool, so is there a way to add a getter/setter in my action class to automatically pick up the request header, similar to parameters?



> Date: Fri, 1 May 2009 15:29:03 -0230
> Subject: Re: determine if iphone user?
> From: richardsayre@gmail.com
> To: user@struts.apache.org
> 
> I think the HTTP_USER_AGENT header should be similar to:
> 
> Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+
> (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3
> 
> If a request comes from the IPhone browser
> 
> On Fri, May 1, 2009 at 3:06 PM, Andy <an...@hotmail.com> wrote:
> >
> > Hi, is there an easy way to tell in an s2 action if the request is coming from an iphone/mobile device?
> >
> > Thanks!
> >
> > _________________________________________________________________
> > Insert movie times and more without leaving Hotmail®.
> > http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Hotmail® has a new way to see what's up with your friends.
http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009

Re: determine if iphone user?

Posted by Richard Sayre <ri...@gmail.com>.
I think the HTTP_USER_AGENT header should be similar to:

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+
(KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3

If a request comes from the IPhone browser

On Fri, May 1, 2009 at 3:06 PM, Andy <an...@hotmail.com> wrote:
>
> Hi, is there an easy way to tell in an s2 action if the request is coming from an iphone/mobile device?
>
> Thanks!
>
> _________________________________________________________________
> Insert movie times and more without leaving Hotmail®.
> http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org