Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1EADD1811A for ; Wed, 23 Dec 2015 13:13:45 +0000 (UTC) Received: (qmail 24888 invoked by uid 500); 23 Dec 2015 13:13:43 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 24839 invoked by uid 500); 23 Dec 2015 13:13:43 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 24828 invoked by uid 99); 23 Dec 2015 13:13:43 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Dec 2015 13:13:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id B162D1A04A1 for ; Wed, 23 Dec 2015 13:13:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.446 X-Spam-Level: **** X-Spam-Status: No, score=4.446 tagged_above=-999 required=6.31 tests=[FREEMAIL_REPLY=1, HTML_MESSAGE=3, KAM_LIVE=1, RP_MATCHES_RCVD=-0.554, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id RFQ9lxUCNe5A for ; Wed, 23 Dec 2015 13:13:30 +0000 (UTC) Received: from BLU004-OMC2S31.hotmail.com (blu004-omc2s31.hotmail.com [65.55.111.106]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 39FEB20185 for ; Wed, 23 Dec 2015 13:13:29 +0000 (UTC) Received: from BLU172-W41 ([65.55.111.73]) by BLU004-OMC2S31.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Wed, 23 Dec 2015 05:13:21 -0800 X-TMN: [D++jkEmxQA5/jrs2DzQFUNzXhsYm6+ym] X-Originating-Email: [mgainty@hotmail.com] Message-ID: Content-Type: multipart/alternative; boundary="_ecf3caa2-d104-4026-92c1-2356b1b09ce2_" From: Martin Gainty To: Struts Users Mailing List Subject: RE: Struts 1 migrate to Struts 2 question Date: Wed, 23 Dec 2015 08:13:21 -0500 Importance: Normal In-Reply-To: References: , MIME-Version: 1.0 X-OriginalArrivalTime: 23 Dec 2015 13:13:21.0836 (UTC) FILETIME=[B2B03EC0:01D13D83] --_ecf3caa2-d104-4026-92c1-2356b1b09ce2_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > Date: Tue=2C 22 Dec 2015 20:38:47 -0500 > Subject: Re: Struts 1 migrate to Struts 2 question > From: davelnewton@gmail.com > To: user@struts.apache.org >=20 > > > > The effort required to upgrade and test a large application to Struts > > version 2 looks very large. The effort to upgrade and test the entire > > application in a single release looks undoable. > > >=20 > Agreed. >=20 >=20 > > 1) Are there any software tools that can be used to speed up the t= ime > > to update JSPs=2C page validation=2C tag library calls=2C Action classe= s=2C etc to > > reduce development=2C improve code quality=2C and reduce testing time? > > >=20 > None that I'm aware of. >=20 >=20 > > 2) Can a single application use both Struts 1 and Struts 2 at the > > same time? > > >=20 > Yes. >=20 >=20 > > a. Would it be feasible to use Struts 2 for any new pages and > > upgrade to Struts 2 for any pages being changed for other reasons? > > >=20 > Yes. >=20 >=20 > > 3) We do an application release every 6 weeks or so. We can't do > > this in one release unless we find or develop a tool to help us convert > > pages to Struts 2. We are considering upgrading 100 pages per release = to > > Struts 2. Has anyone done something like this successfully? What are = best > > practices and lessons learned? > > >=20 > That strikes me as a fairly aggressive timeline=2C obviously it depends o= n > the pages and functionality. >=20 > There are zero similarities between S1 and S2. If your S1 app was > well-architected the effort will be confined to the view and controller > layers=2C at least=2C but even that is non-trivial. >=20 > 4) Test effort. With all of the code changes required it seems that > > developers could miss things. > > >=20 > If you have no integration tests=2C then yes=2C this will be fraught with > potential issues. Again=2C a well-architected S1 app is in less danger si= nce > the important business logic is already isolated and Struts acts only as = a > mediation layer between the client (e.g.=2C the browser or API users) and= the > business logic. >=20 > The ultimate answer(s) really depends on the nature of your app. If the J= SP > pages are simple it might be possible to write a small conversion tool th= at > does a rough translation between tag libraries=3B beyond that... it'll be > mostly manual labor. >=20 > Dave MG>Dave is right MG>the Struts2 wrapper for existing Struts1 Actions and Struts1 Action Form= s is called "struts-1-plugin" MG>To use existing Struts1 Actions and ActionForms into a Struts2 Applicati= on=2C create a normal Struts2 configuration package in struts.xml but MG>ha= ve it extend struts1-default. Struts1-default paclage contains interceptors= and a default interceptor stack that work this plugin INTO the MG>Struts2 = request process MG>the interceptor-ref interceptor named struts1-default is the interceptor= that manages the creation and scope of your ActionForm: com.mycompany.myapp.MyAction com.mycompany.myapp.MyForm<= /param> gangsterForm session myAction.jspMG>struts1-default package= itself is declared in src/main/resources/struts-plugin.xml (inside the plu= gin) the declaration should start with: MG>MG> MG>Doc available at:MG>https://struts.apache.org/docs/struts-1-plugin.h= tml MG>be sure to copy struts2-struts1-plugin*.jar to /WEB-INF/lib and copy str= uts1*.jar to WEB-INF/lib before restarting webapp >=20 > --=20 > e: davelnewton@gmail.com > m: 908-380-8699 > s: davelnewton_skype > t: @dave_newton > b: Bucky Bits > g: davelnewton > so: Dave Newton = --_ecf3caa2-d104-4026-92c1-2356b1b09ce2_--