You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Lukasz Lenart <lu...@apache.org> on 2012/07/20 10:12:42 UTC

Examples app

Hi,

What do you thinking about adding small example apps to Struts 2 ?

I was thinking about adding some example how to use more advanced
futures of Struts 2 - mostly extension points. It would be a new Maven
module next to core / apps so on.

Why inside the Struts 2 ? It's better to test and check if it works.
With separated project, I must build Struts 2, build project and test
it.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: Examples app

Posted by Lukasz Lenart <lu...@apache.org>.
Hi Todd,

If you want to you can create a sub-task and attach your example
application to it, please create your sub-task under [1]

[1] https://issues.apache.org/jira/browse/WW-3853

If someone has some wishes to prepare an example app please add
sub-task as well.


Kind regards
--
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/

2012/7/20 Kofford, C. Todd <tk...@ku.edu>:
> Hi Phil,
>
> Thanks for the feedback and I completely understand your points.
>
> I was just looking for a place to share my work, since I've heard other struts 2 developers looking for this type of functionality. I'll check into what's involved to contribute to the cookbook, and then submit the app for others to review.
>
> Todd Kofford
> System Integration
> KU Information Technology
> tkofford@ku.edu
> (785) 864-0327
>
> ________________________________________
> From: Philip Luppens [philip.luppens@gmail.com]
> Sent: Friday, July 20, 2012 7:28 AM
> To: Struts Developers List
> Subject: Re: Examples app
>
> On Fri, Jul 20, 2012 at 2:04 PM, Kofford, C. Todd <tk...@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
>> tkofford@ku.edu
>> (785) 864-0327
>>
>> ________________________________________
>> From: Lukasz Lenart [lukaszlenart@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-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
> --
> "We cannot change the cards we are dealt, just how we play the hand." -
> Randy Pausch
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>

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


RE: Examples app

Posted by "Kofford, C. Todd" <tk...@ku.edu>.
Hi Phil, 

Thanks for the feedback and I completely understand your points. 

I was just looking for a place to share my work, since I've heard other struts 2 developers looking for this type of functionality. I'll check into what's involved to contribute to the cookbook, and then submit the app for others to review.

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

________________________________________
From: Philip Luppens [philip.luppens@gmail.com]
Sent: Friday, July 20, 2012 7:28 AM
To: Struts Developers List
Subject: Re: Examples app

On Fri, Jul 20, 2012 at 2:04 PM, Kofford, C. Todd <tk...@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
> tkofford@ku.edu
> (785) 864-0327
>
> ________________________________________
> From: Lukasz Lenart [lukaszlenart@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-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


--
"We cannot change the cards we are dealt, just how we play the hand." -
Randy Pausch


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


RE: Examples app

Posted by Martin Gainty <mg...@hotmail.com>.
yes Ive seen alot of apps replatformed  to the mobile arena refactored back to their "HTML(5) roots"
I like the JSP JS libraries available for JSTL, Struts and specifically JQuery and am anxious to find a way to make JSPs that implement these technologies 
to interoperate on a client level on a mobile platform
the immediate challenges:
1)Reducing Screen Size and effectively 'shrinking' every JSP page down (while retaining the aspect ratio).http://davidchambersdesign.com/resize-browser-window-to-match-iphone-viewport-dimensions/http://docs.blackberry.com/en/developers/deliverables/6176/HTML_ref_meta_564143_11.jsp
2)Determine the Event based model which will work for both Blackberry and iPhonehttp://iphonedevelopmentbits.com/event-driven-multitasking-runloopssymbian-ioshttp://www.oracle.com/technetwork/java/index-139239.html
Thanks for the prompt answer.. AND the helpful hints detecting USER-AGENT!
Saludos Cordiales desde SudAmerica
Martin Gainty 
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

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: tkofford@ku.edu
> To: dev@struts.apache.org
> Subject: RE: Examples app
> Date: Sun, 22 Jul 2012 20:21:55 +0000
> 
> 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
> tkofford@ku.edu
> (785) 864-0327
> 
> ________________________________________
> From: Martin Gainty [mgainty@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.luppens@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 <tk...@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
> > > tkofford@ku.edu
> > > (785) 864-0327
> > >
> > > ________________________________________
> > > From: Lukasz Lenart [lukaszlenart@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-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: dev-help@struts.apache.org
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: dev-help@struts.apache.org
> > >
> > >
> >
> >
> > --
> > "We cannot change the cards we are dealt, just how we play the hand." -
> > Randy Pausch
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
 		 	   		  

Re: Examples app

Posted by Rene Gielen <gi...@it-neering.net>.
Todd,

in many cases simple is simply good :) You would not want to re-invent
PhoneGap, would you? I like your idea.

- René

Am 7/22/12 22:21 , schrieb Kofford, C. Todd:
> 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
> tkofford@ku.edu
> (785) 864-0327
> 
> ________________________________________
> From: Martin Gainty [mgainty@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.luppens@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 <tk...@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
>>> tkofford@ku.edu
>>> (785) 864-0327
>>>
>>> ________________________________________
>>> From: Lukasz Lenart [lukaszlenart@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-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
>>
>> --
>> "We cannot change the cards we are dealt, just how we play the hand." -
>> Randy Pausch
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 

-- 
René Gielen
IT-Neering.net
Saarstrasse 100, 52062 Aachen, Germany
Tel: +49-(0)241-4010770
Fax: +49-(0)241-4010771
Cel: +49-(0)163-2844164
http://twitter.com/rgielen

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


RE: Examples app

Posted by "Kofford, C. Todd" <tk...@ku.edu>.
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
tkofford@ku.edu
(785) 864-0327

________________________________________
From: Martin Gainty [mgainty@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.luppens@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 <tk...@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
> > tkofford@ku.edu
> > (785) 864-0327
> >
> > ________________________________________
> > From: Lukasz Lenart [lukaszlenart@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-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>
>
> --
> "We cannot change the cards we are dealt, just how we play the hand." -
> Randy Pausch

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


RE: Examples app

Posted by Martin Gainty <mg...@hotmail.com>.
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.luppens@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 <tk...@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
> > tkofford@ku.edu
> > (785) 864-0327
> >
> > ________________________________________
> > From: Lukasz Lenart [lukaszlenart@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-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
> 
> 
> -- 
> "We cannot change the cards we are dealt, just how we play the hand." -
> Randy Pausch
 		 	   		  

Re: Examples app

Posted by Philip Luppens <ph...@gmail.com>.
On Fri, Jul 20, 2012 at 2:04 PM, Kofford, C. Todd <tk...@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
> tkofford@ku.edu
> (785) 864-0327
>
> ________________________________________
> From: Lukasz Lenart [lukaszlenart@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-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


-- 
"We cannot change the cards we are dealt, just how we play the hand." -
Randy Pausch

RE: Examples app

Posted by "Kofford, C. Todd" <tk...@ku.edu>.
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.

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

________________________________________
From: Lukasz Lenart [lukaszlenart@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-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org




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


Re: Examples app

Posted by Lukasz Lenart <lu...@apache.org>.
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-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Examples app

Posted by John Keats <ke...@gmail.com>.
It will be very beneficial to add more pragmatic samples to the apps,
probably some integrated with spring etc.

On Fri, Jul 20, 2012 at 4:18 PM, Umesh Awasthi <um...@gmail.com>wrote:

> +1
> Most of the such extension points are still not well documented or lacks
> examples to explains how to use them.
>
> On Fri, Jul 20, 2012 at 1:42 PM, Lukasz Lenart <lukaszlenart@apache.org
> >wrote:
>
> > Hi,
> >
> > What do you thinking about adding small example apps to Struts 2 ?
> >
> > I was thinking about adding some example how to use more advanced
> > futures of Struts 2 - mostly extension points. It would be a new Maven
> > module next to core / apps so on.
> >
> > Why inside the Struts 2 ? It's better to test and check if it works.
> > With separated project, I must build Struts 2, build project and test
> > it.
> >
> >
> > Regards
> > --
> > Łukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>
>
> --
> With Regards
> Umesh Awasthi
> http://www.travellingrants.com/
>

Re: Examples app

Posted by Umesh Awasthi <um...@gmail.com>.
+1
Most of the such extension points are still not well documented or lacks
examples to explains how to use them.

On Fri, Jul 20, 2012 at 1:42 PM, Lukasz Lenart <lu...@apache.org>wrote:

> Hi,
>
> What do you thinking about adding small example apps to Struts 2 ?
>
> I was thinking about adding some example how to use more advanced
> futures of Struts 2 - mostly extension points. It would be a new Maven
> module next to core / apps so on.
>
> Why inside the Struts 2 ? It's better to test and check if it works.
> With separated project, I must build Struts 2, build project and test
> it.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

Re: Examples app

Posted by Lukasz Lenart <lu...@apache.org>.
2012/9/4 Dave Newton <da...@gmail.com>:
> I think the coolest would be to have some BDD in there, like with easyb/etc.

I have no experiences with BDD/easyb, some example ?

> It can drive JWebUnit (IIRC, or HtmlUnit), can be run from Maven, and is
> easy to write.

Yeah, no needs to run a web browser and so on, but that's wrong :/

Anyway, I was able to add a simple integration test to Blank Webapp,
it looks like below, WDYT? Is it the right direction ?

public class HelloWorldIntegrationTest {

    public static final int PORT = 8090;

    @Before
    public void setUp() throws Exception {
        Server server = new Server(PORT);
        WebAppContext handler = new WebAppContext("src/main/webapp",
"/struts2-blank");
        server.setHandler(handler);
        server.start();

        JWebUnit.setBaseUrl("http://localhost:" + PORT + "/struts2-blank/");
    }

    @Test
    public void testIndex() throws Exception {
        // when
        JWebUnit.beginAt("index.action");

        // then
        JWebUnit.assertResponseCode(200);
        JWebUnit.assertTitleEquals("Struts is up and running ...");
        JWebUnit.assertLinkPresentWithExactText("English");
        JWebUnit.assertLinkPresentWithExactText("Espanol");
    }

}


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: Examples app

Posted by Dave Newton <da...@gmail.com>.
I think the coolest would be to have some BDD in there, like with easyb/etc.

It can drive JWebUnit (IIRC, or HtmlUnit), can be run from Maven, and is
easy to write.

Dave

On Tue, Sep 4, 2012 at 9:44 AM, Lukasz Lenart <lu...@apache.org>wrote:

> 2012/7/24 Rene Gielen <rg...@apache.org>:
> > Unless someone has the time to give the showcase application a full
> > redesign, having small focused examples around sounds reasonable to me.
> > Martin's valid concerns about quality assurance should indeed be well
> > addressed by having Selenium or WebDriver tests around - which would be
> > a good demonstration by itself on how to develop robust web
> > applications. We could easily establish a "no release without
> > integration / automated acceptance tests" policy for such example
> projects.
>
> I thought about using Selenium, but I found JWebUnit [1], which
> basically wraps Selenium and HtmlUnit. WDYT?
>
> http://jwebunit.sourceforge.net/
>
>
> Kind regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


-- 
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>
g: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>

Re: Examples app

Posted by Lukasz Lenart <lu...@apache.org>.
2012/7/24 Rene Gielen <rg...@apache.org>:
> Unless someone has the time to give the showcase application a full
> redesign, having small focused examples around sounds reasonable to me.
> Martin's valid concerns about quality assurance should indeed be well
> addressed by having Selenium or WebDriver tests around - which would be
> a good demonstration by itself on how to develop robust web
> applications. We could easily establish a "no release without
> integration / automated acceptance tests" policy for such example projects.

I thought about using Selenium, but I found JWebUnit [1], which
basically wraps Selenium and HtmlUnit. WDYT?

http://jwebunit.sourceforge.net/


Kind regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: Examples app

Posted by Rene Gielen <rg...@apache.org>.
Unless someone has the time to give the showcase application a full
redesign, having small focused examples around sounds reasonable to me.
Martin's valid concerns about quality assurance should indeed be well
addressed by having Selenium or WebDriver tests around - which would be
a good demonstration by itself on how to develop robust web
applications. We could easily establish a "no release without
integration / automated acceptance tests" policy for such example projects.

- René

Am 7/23/12 16:26 , schrieb Dave Newton:
> On Mon, Jul 23, 2012 at 10:02 AM, Łukasz Lenart wrote:
> 
>> Good point, that's why I thought about Selenium test for that, it's
>> really pain in the ass to click around the showcase app to check if
>> everything is ok. It would be a good idea to have a small examples
>> (more like a code snippets) to present given feature with some small
>> Selenium test which will check if the example works (application
>> started and the home page is accessible), the feature is working (eg.
>> my own number converter converts numbers into given format).
>>
> 
> I've found the showcase app too big to be navigable.
> 
> I think I'd rather see the examples much more self-contained, and I like
> the idea of using Selenium/etc. to keep them "in-check".
> 
> I'm not sure what that would look like in real life; there's no sense in
> having them *so* granular that there's an app for every feature, but when
> trying to point someone at a specific example it's a bit of a pain to dig
> out the relevant snippets.
> 
> I'll think on this a bit since I'm interested in it, and find myself trying
> to gather chunks of code/config to post on SO frequently enough that this
> matters to me.
> 
> Dave
> 

-- 
René Gielen
http://twitter.com/rgielen

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


Re: Examples app

Posted by Dave Newton <da...@gmail.com>.
On Mon, Jul 23, 2012 at 10:02 AM, Łukasz Lenart wrote:

> Good point, that's why I thought about Selenium test for that, it's
> really pain in the ass to click around the showcase app to check if
> everything is ok. It would be a good idea to have a small examples
> (more like a code snippets) to present given feature with some small
> Selenium test which will check if the example works (application
> started and the home page is accessible), the feature is working (eg.
> my own number converter converts numbers into given format).
>

I've found the showcase app too big to be navigable.

I think I'd rather see the examples much more self-contained, and I like
the idea of using Selenium/etc. to keep them "in-check".

I'm not sure what that would look like in real life; there's no sense in
having them *so* granular that there's an app for every feature, but when
trying to point someone at a specific example it's a bit of a pain to dig
out the relevant snippets.

I'll think on this a bit since I'm interested in it, and find myself trying
to gather chunks of code/config to post on SO frequently enough that this
matters to me.

Dave

Re: Examples app

Posted by Łukasz Lenart <lu...@googlemail.com>.
2012/7/21 Martin Cooper <ma...@apache.org>:
>> What do you thinking about adding small example apps to Struts 2 ?
>
> Who will maintain them, and keep them up to date when the core
> framework changes? How will we ensure that they continue to represent
> best practices when new features or mechanisms are introduced into the
> framework?

Struts Devs as it will be part of the project

>> I was thinking about adding some example how to use more advanced
>> futures of Struts 2 - mostly extension points. It would be a new Maven
>> module next to core / apps so on.
>>
>> Why inside the Struts 2 ? It's better to test and check if it works.
>> With separated project, I must build Struts 2, build project and test
>> it.
>
> So the RM would be responsible for manually testing all of these apps
> to ensure that they are working before a build could be considered
> ready to put to a vote? If they're "inside" S2, that would have to be
> true. You couldn't release if the apps were broken.
>
> Don't get me wrong - I'm all for having examples. But they need to be
> maintained, and that takes sustained effort over time. And as the RM
> for many releases of S1, I'll point out that manual testing of
> examples as part of every build is not a trivial task either -
> especially when you find that something over the last few months broke
> an app, nobody discovered the breakage until now, and now you can't
> release until you've fixed it.

Good point, that's why I thought about Selenium test for that, it's
really pain in the ass to click around the showcase app to check if
everything is ok. It would be a good idea to have a small examples
(more like a code snippets) to present given feature with some small
Selenium test which will check if the example works (application
started and the home page is accessible), the feature is working (eg.
my own number converter converts numbers into given format).

It should be in the same way as in any other commercial project where
UI tests / functional tests are the latest devs boundary ;-)


Regards
-- 
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

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


Re: Examples app

Posted by Martin Cooper <ma...@apache.org>.
On Fri, Jul 20, 2012 at 1:12 AM, Lukasz Lenart <lu...@apache.org> wrote:
> Hi,
>
> What do you thinking about adding small example apps to Struts 2 ?

Who will maintain them, and keep them up to date when the core
framework changes? How will we ensure that they continue to represent
best practices when new features or mechanisms are introduced into the
framework?

> I was thinking about adding some example how to use more advanced
> futures of Struts 2 - mostly extension points. It would be a new Maven
> module next to core / apps so on.
>
> Why inside the Struts 2 ? It's better to test and check if it works.
> With separated project, I must build Struts 2, build project and test
> it.

So the RM would be responsible for manually testing all of these apps
to ensure that they are working before a build could be considered
ready to put to a vote? If they're "inside" S2, that would have to be
true. You couldn't release if the apps were broken.

Don't get me wrong - I'm all for having examples. But they need to be
maintained, and that takes sustained effort over time. And as the RM
for many releases of S1, I'll point out that manual testing of
examples as part of every build is not a trivial task either -
especially when you find that something over the last few months broke
an app, nobody discovered the breakage until now, and now you can't
release until you've fixed it.

--
Martin Cooper


> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>

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