Hi Martin,

Unfortunately, my example is very simple and only demonstrates a way to have 2 
separate sets/path of JSPs (or other view types) and a mechanism to determine 
the requesting client via the "user-agent" value in the http request. I use the 
UserAgentUtils (http://user-agent-utils.java.net/) for all the logic to 
"decipher" the user-agent string into a platform (desktop, tablet, mobile, 
etc.). I then user that information to select the appropriate set of views by 
setting a viewType variable on the stack.

I don't try to address any of the view details (mobile, desktop, etc.) since 
that's a very large topic, but realized that my full desktop views are usually 
not appropriate for mobile devices,and that's the problem that I addressed with 
my example. We've started to address the mobile view topic some by using HTML5 
& CSS3, as they seem to handle scaling to mobile screens fairly well.

I hope that helps.

Todd Kofford
System Integration
KU Information Technology
tkoff...@ku.edu
(785) 864-0327

________________________________________
From: Martin Gainty [mgai...@hotmail.com]
Sent: Friday, July 20, 2012 8:43 AM
To: dev@struts.apache.org
Subject: RE: Examples app

Hi Todd I would like to hear about accomodating screen size...in other words 
how does one write a JSP to *shrink* to the specific width and height of either 
a iPhone or Blackberry
Are there vendor specific (iPhone or Blackberry) APIs  (or can you send a 
regular jsp to these devices and hope they will *shrink* to the size of the 
device viewport)
Also some mobile app devices are 'event based' ..is there are any information 
on what those events are and where the 'javadoc' might beAlso as far as pulling 
information from web services for iPhone or Blackberry can either iPhone or 
Blackberry accomodate HTML, XML and or SOAP 1.1?what types of security do 
iPhone and or Blackberry devices support SSLv2 or SSLV3 or both?does either 
iPhone or Blackberry support HTTP 1.0 or HTTP 1.1 or both? thanks!
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

 > From: philip.lupp...@gmail.com
> Date: Fri, 20 Jul 2012 14:28:48 +0200
> Subject: Re: Examples app
> To: dev@struts.apache.org
>
> On Fri, Jul 20, 2012 at 2:04 PM, Kofford, C. Todd <tkoff...@ku.edu> wrote:
>
> > With mobile apps being so prevalent now days, I created a small example
> > that includes a custom interceptor which determines a different view (path
> > to JSPs) based on the given user-agent the browser passes in. So if you're
> > on a mobile device (phone, tablet, game console, etc.) it uses the mobile
> > view JSPs, otherwise it uses the default JSPs appropriate for a
> > desktop/laptop computer.
> >
> > I know that I'm probably not the first person to need a single app to have
> > multiple views based on device, so I'd like to help out others with similar
> > needs. Besides that, it really showcases struts 2's ability to be easily
> > extended and tailored for specific needs.
> >
> > Would there be any interest in an example app like that? Even if it wasn't
> > included in struts 2, it could be a useful example app for others.
> >
>
> Hello Todd,
>
> I'd say that everything is welcome, provided the quality is within certain
> boundaries, of course ;-)
> But since this is pretty small and perhaps a bit too specific for an
> example, I'd wager it would be a better fit for a cookbook[1] entry than an
> actual example.
>
> My 2 cents,
>
> Phil
>
> [1] http://struts.apache.org/2.x/docs/cookbook.html
>
>
> >
> > Todd Kofford
> > System Integration
> > KU Information Technology
> > tkoff...@ku.edu
> > (785) 864-0327
> >
> > ________________________________________
> > From: Lukasz Lenart [lukaszlen...@apache.org]
> > Sent: Friday, July 20, 2012 4:28 AM
> > To: Struts Developers List
> > Subject: Re: Examples app
> >
> > Friday isn't the best day to do anything - I though about "Example
> > apps" and not "Examples app" :P
> >
> >
> > Regards
> > --
> > Łukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
> > For additional commands, e-mail: dev-h...@struts.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
> > For additional commands, e-mail: dev-h...@struts.apache.org
> >
> >
>
>
> --
> "We cannot change the cards we are dealt, just how we play the hand." -
> Randy Pausch

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to