Re: struts 1 to struts2 migration.

2013-08-07 Thread Sreekanth S. Nair
Hi Arpan,
   We too did a struts1 to strust2 migration in recent past,
its not so easy to migrate as it is. Since Struts2 gives more importance to
security nowadays its always advisable to learn the correct implementation
from struts2 doc and migrate your struts1 actions one by one. Strust2 and
struts1 can co-exist inside same application till you migrate it fully.



-- 
Thanks & Regards
Srikanth


On Wed, Aug 7, 2013 at 9:45 PM, Arpan  wrote:

> Thank you so much Lukasz.. While migrating I found few more problems. Such
> as
>
> In struts 1 JSP I have used  name="FormName" />
> In scriplet there are many places we used <% String s = x.getName(); %>
>
> In struts 2 we can write 
>
> Now how can I use the "x" object in scriplet. As there are many references
> of "x" already written, I don't want to change so much code for now. Hence
> like to use scriplet only.
>
> Thanks
>
>
> On Wed, Aug 7, 2013 at 7:34 PM, Lukasz Lenart  >wrote:
>
> > You can try to write your own ActionMapper which will extract request
> > parameter "action" and base on that lookup for action.
> >
> > 2013/8/7 Arpan :
> > > Anybody to help here...
> > >
> > > Thanks in Advance.
> > >
> > >
> > > On Tue, Aug 6, 2013 at 7:43 PM, Arpan  wrote:
> > >
> > >> Hi All,
> > >>
> > >> We are migrating from struts1 to struts2.
> > >>
> > >> In our pages we have multiple buttons which through struts1
> > DispatchAction
> > >> can be guided  to different methods in Action class. For that we need
> > >> minimal changes. Such as
> > >>  In action mapping if we add parameter="action" and in JSP if the URL
> is
> > >> like x.do?action=method1, it happily directs the control to method1 in
> > >> Action class.
> > >>
> > >> I got the bellow link for struts2, but for that also we need much
> > changes
> > >> to be done.
> > >>
> >
> http://struts.apache.org/development/2.x/docs/multiple-submit-buttons.html
> > >>
> > >> Is there any such way we do similar functionality in struts2 with
> > minimal
> > >> changes.
> > >>
> > >> Thanks
> > >>
> > >>
> > >>
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
>


Re: sj:select default value not load

2013-08-07 Thread Sreekanth S. Nair
here the value of why is representing key or value ? The value your are
providing to *value* attribute (value="%{why}"), it should always represent
the key (not the display value).

-- 
Thanks & Regards
Srikanth
Software Developer

eGovernments Foundations
www.egovernments.org
Mob : 9980078913



On Sat, Aug 3, 2013 at 1:30 AM, john lee  wrote:

>
> For struts2 sj:select tag from google
>
> 
>  href="%{remoteurl}"
> id="language"
> onChangeTopics="reloadsecondlist"
> name="language"
> list="languageObjList"
> listKey="myKey"
> listValue="myValue"
> emptyOption="true"
> headerKey="-1"
> headerValue="Select Category"
> value="why"
> />
>
> for above jsp file, i can retrieve the data from KeywordcategoryAction for
> no problem
>
> but, the default value(why) as defined from KeywordcategoryAction did not
> working at all
>
> I try to change from value="why" to value="%{why}", but still not working,
>
> the setting inside  KeywordcategoryAction is the following
>...
> public String getWhy(String why) { return why; }
> public void setWhy(String why) { this.why=why; }
> why="Temperature";
> return success;
>
>
> please advise, thanks in advance
>
> john


Re: Annotation Support for bypassing prepare

2013-08-07 Thread Sreekanth S. Nair
I admit it, thats why i mentioned it as a pinch of performance :) .

-- 
Thanks & Regards
Srikanth
Software Developer

eGovernments Foundations
www.egovernments.org
Mob : 9980078913



On Thu, Aug 8, 2013 at 10:57 AM, Paul Benedict  wrote:

> I don't see a performance concern here. Checking a few strings isn't going
> to slow down anything.
> On Aug 8, 2013 12:06 AM, "Sreekanth S. Nair" <
> sreekanth.n...@egovernments.org> wrote:
>
> > Guess same performance concern is applicable for that as well. Any ideas
> of
> > making it simpler for existing app without much coding, performance and
> > clumsiness could be better. And i think @SkipPreapre at method level
> gives
> > more visibility than at class level
> > @SkipPrepare({"xdsdasds",ydsdsdsdsds","zsdsdsdsdsds"}).
> >
> > --
> > Thanks & Regards
> > Srikanth
> > Software Developer
> > 
> > eGovernments Foundations
> > www.egovernments.org
> > Mob : 9980078913
> > 
> >
> >
> > On Thu, Aug 8, 2013 at 9:42 AM, Paul Benedict 
> > wrote:
> >
> > > Not an array of prepares, but an array of strings for which "execute"
> > > methods the Preaparable callback should be excluded.
> > > On Aug 7, 2013 11:09 PM, "Sreekanth S. Nair" <
> > > sreekanth.n...@egovernments.org> wrote:
> > >
> > > > With all gratitude, I strongly disagree with that idea . That bring
> > more
> > > > clumsiness to big strust2 applications. And the idea of taking an
> array
> > > of
> > > > Prepare is a good idea but don't you think it consumes a pinch of
> > runtime
> > > > performance.
> > > >
> > >
> >
>


Re: Annotation Support for bypassing prepare

2013-08-07 Thread Paul Benedict
I don't see a performance concern here. Checking a few strings isn't going
to slow down anything.
On Aug 8, 2013 12:06 AM, "Sreekanth S. Nair" <
sreekanth.n...@egovernments.org> wrote:

> Guess same performance concern is applicable for that as well. Any ideas of
> making it simpler for existing app without much coding, performance and
> clumsiness could be better. And i think @SkipPreapre at method level gives
> more visibility than at class level
> @SkipPrepare({"xdsdasds",ydsdsdsdsds","zsdsdsdsdsds"}).
>
> --
> Thanks & Regards
> Srikanth
> Software Developer
> 
> eGovernments Foundations
> www.egovernments.org
> Mob : 9980078913
> 
>
>
> On Thu, Aug 8, 2013 at 9:42 AM, Paul Benedict 
> wrote:
>
> > Not an array of prepares, but an array of strings for which "execute"
> > methods the Preaparable callback should be excluded.
> > On Aug 7, 2013 11:09 PM, "Sreekanth S. Nair" <
> > sreekanth.n...@egovernments.org> wrote:
> >
> > > With all gratitude, I strongly disagree with that idea . That bring
> more
> > > clumsiness to big strust2 applications. And the idea of taking an array
> > of
> > > Prepare is a good idea but don't you think it consumes a pinch of
> runtime
> > > performance.
> > >
> >
>


Re: Annotation Support for bypassing prepare

2013-08-07 Thread Sreekanth S. Nair
Guess same performance concern is applicable for that as well. Any ideas of
making it simpler for existing app without much coding, performance and
clumsiness could be better. And i think @SkipPreapre at method level gives
more visibility than at class level
@SkipPrepare({"xdsdasds",ydsdsdsdsds","zsdsdsdsdsds"}).

-- 
Thanks & Regards
Srikanth
Software Developer

eGovernments Foundations
www.egovernments.org
Mob : 9980078913



On Thu, Aug 8, 2013 at 9:42 AM, Paul Benedict  wrote:

> Not an array of prepares, but an array of strings for which "execute"
> methods the Preaparable callback should be excluded.
> On Aug 7, 2013 11:09 PM, "Sreekanth S. Nair" <
> sreekanth.n...@egovernments.org> wrote:
>
> > With all gratitude, I strongly disagree with that idea . That bring more
> > clumsiness to big strust2 applications. And the idea of taking an array
> of
> > Prepare is a good idea but don't you think it consumes a pinch of runtime
> > performance.
> >
>


Re: Annotation Support for bypassing prepare

2013-08-07 Thread Paul Benedict
Not an array of prepares, but an array of strings for which "execute"
methods the Preaparable callback should be excluded.
On Aug 7, 2013 11:09 PM, "Sreekanth S. Nair" <
sreekanth.n...@egovernments.org> wrote:

> With all gratitude, I strongly disagree with that idea . That bring more
> clumsiness to big strust2 applications. And the idea of taking an array of
> Prepare is a good idea but don't you think it consumes a pinch of runtime
> performance.
>


Re: Annotation Support for bypassing prepare

2013-08-07 Thread Sreekanth S. Nair
With all gratitude, I strongly disagree with that idea . That bring more
clumsiness to big strust2 applications. And the idea of taking an array of
Prepare is a good idea but don't you think it consumes a pinch of runtime
performance.


RE: sj:select value problem

2013-08-07 Thread David Wang
Thanks Lukasz, 

David 

> From: lukaszlen...@apache.org
> Date: Wed, 7 Aug 2013 12:01:23 +0200
> Subject: Re: sj:select value problem
> To: user@struts.apache.org
> 
> 2013/8/7 David Wang :
> > value="%{patternKeyword2}"   />
> 
> I don't know if this supports anything else than just a String. Please
> ask question on the user group or directly under the wiki page
> 
> https://groups.google.com/forum/#!forum/struts2-jquery
> https://code.google.com/p/struts2-jquery/wiki/SelectTag
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
  

RE: [struts 2] java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd

2013-08-07 Thread Martin Gainty
I dont know which DTD reference in which validator.xml is going fubar 

 

assume the dtd is co-located in same folder where Login-validation.xml is 
located at

/pathToLoginValidationXML/xwork-validator-1.0.2.dtd

 

you would need to change the http protocol to file protocol in the specified 
DOCTYPE declarator

 



(In other words for every xml where a reference to xwork-validator-1.0.2.dtd is 
encountered

change 'http' to 'file' for all declarators referencing 
xwork-validator-1.0.2.dtd)


HTH!
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: mgai...@hotmail.com
> To: user@struts.apache.org
> Subject: RE: [struts 2] java.io.FileNotFoundException: 
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
> Date: Wed, 7 Aug 2013 13:30:39 -0400
> 
> Hi John
> 
> xwork-validator-1.0.2.dtd *should* be in xwork-core-.jar
> 
> jar -tvf xwork-.jar | grep xwork-validator
> 
> ?
> Martin Gainty 
> __ 
> 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: j...@rodaxsoft.com
> > Subject: [struts 2] java.io.FileNotFoundException: 
> > http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
> > Date: Wed, 7 Aug 2013 10:14:21 -0700
> > To: user@struts.apache.org
> > 
> > Hi:
> > 
> > Suddenly, in-production, we're getting file-not-found errors for the 
> > xwork-validator-1.0.2.dtd at http://www.opensymphony.com/xwork.
> > 
> > How can resolve this problem? We're running Struts 2 v2.3.4.1
> > 
> > Thanks, John
> > 
> > -
> > 
> > 10:01:18 ERROR http-8443-1 
> > com.opensymphony.xwork2.validator.AnnotationActionValidatorManager - Caught 
> > exception while loading file XXX-validation.xml
> > http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd - Class: 
> > sun.net.www.protocol.http.HttpURLConnection
> > File: HttpURLConnection.java
> > Method: getInputStream
> > Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
> > ceptor.intercept(I18nInterceptor.java:176)
> > ... 
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
> > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> > at java.lang.Thread.run(Thread.java:619)
> > Caused by: java.io.FileNotFoundException: 
> > http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
> > ...
> > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> > 
> 
  

Re: Annotation Support for bypassing prepare

2013-08-07 Thread Paul Benedict
I wonder if perhaps there should be a Preparable2 interface that passes in
the name of the method that will execute. That might be more advanced than
the annotation. OTOH, @SkipPreparable could take an array of method names.

Which is more functional?


On Sat, Aug 3, 2013 at 3:10 PM, Sreekanth S. Nair <
sreekanth.n...@egovernments.org> wrote:

> Attaching SkippablePrepareInterceptor and SkipPrepare Annotation Code, I
> hope it may helpful for other who have similar requirement. Struts2 can
> include it, if strust2 developer think its worthy.
>
>
> --
> Thanks & Regards
> Srikanth
>
> On Sat, Jul 27, 2013 at 12:00 AM, Sreekanth S. Nair <
> sreekanth.n...@egovernments.org> wrote:
>
>> Hi Chris, i already answered for the same, we have more than 50 modules
>> and 1000 of Action classes. Doing what you say is not an easy task for us
>> instead of adding a simple annotation on those method.
>>
>> --
>> Thanks & Regards
>> Srikanth
>> Software Developer
>> 
>> eGovernments Foundations
>> www.egovernments.org
>> Mob : 9980078913
>> 
>>
>>
>> On Fri, Jul 26, 2013 at 11:55 PM, Chris Pratt wrote:
>>
>>> Why not just take your action and move the Preparable interface and
>>> prepare() function to a subclass with the methods that require it's
>>> support?  Seems a lot easier than creating more infrastructure.
>>>   (*Chris*)
>>>
>>>
>>> On Fri, Jul 26, 2013 at 11:22 AM, Sreekanth S. Nair <
>>> sreekanth.n...@egovernments.org> wrote:
>>>
>>> > Okay, i can create one for mine, leaving to struts2 framework developer
>>> > whether strust2 need an annotation like @SkipPrepare. Thanks for your
>>> > support Dave.
>>> >
>>> > --
>>> > Thanks & Regards
>>> > Srikanth
>>> > Software Developer
>>> > 
>>> > eGovernments Foundations
>>> > www.egovernments.org
>>> > Mob : 9980078913
>>> > 
>>> >
>>> >
>>> > On Fri, Jul 26, 2013 at 11:42 PM, Dave Newton 
>>> > wrote:
>>> >
>>> > > Technically it already *is* part of S2 in the MethodFilterInterceptor
>>> > > class.
>>> > >
>>> > > I'm not particularly excited about an annotation to skip
>>> Prepareable, but
>>> > > I'm not fundamentally opposed, either.
>>> > >
>>> > > Dave
>>> > >
>>> > >
>>> > >
>>> > > On Fri, Jul 26, 2013 at 2:07 PM, Sreekanth S. Nair <
>>> > > sreekanth.n...@egovernments.org> wrote:
>>> > >
>>> > > > The idea is precisely good, thats what i wanted but do you think it
>>> > will
>>> > > be
>>> > > > a good addition to strust2 framework by any chance then i hope the
>>> same
>>> > > > could be a part of struts2 framework itself.
>>> > > >
>>> > > > --
>>> > > > Thanks & Regards
>>> > > > Srikanth
>>> > > > Software Developer
>>> > > > 
>>> > > > eGovernments Foundations
>>> > > > www.egovernments.org
>>> > > > Mob : 9980078913
>>> > > > 
>>> > > >
>>> > > >
>>> > > > On Fri, Jul 26, 2013 at 7:01 PM, Dave Newton <
>>> davelnew...@gmail.com>
>>> > > > wrote:
>>> > > >
>>> > > > > If you'll note in the docs the interceptor extends
>>> > > > MethodFilterInterceptor,
>>> > > > > so one trivial way to fix it is to configure the interceptor for
>>> the
>>> > > > > specific actions.
>>> > > > >
>>> > > > > Another option is to take the existing interceptor and extend it
>>> to
>>> > > > support
>>> > > > > something like annotations, a naming convention, etc. to skip
>>> either
>>> > > > > specific or general methods.
>>> > > > >
>>> > > > > E.g., if your validation call was always named the same thing,
>>> you
>>> > > could
>>> > > > > either configure the interceptor package-wide, or change the
>>> prepare
>>> > > > > interceptor to always skip preparation for methods annotated with
>>> > > > > @DoNotPrepare, etc.
>>> > > > >
>>> > > > > Dave
>>> > > > >
>>> > > > >
>>> > > > >
>>> > > > > On Fri, Jul 26, 2013 at 9:19 AM, Sreekanth S. Nair <
>>> > > > > sreekanth.n...@egovernments.org> wrote:
>>> > > > >
>>> > > > > > Too many methods :( needs its own prepare then.
>>> > > > > >
>>> > > > > > --
>>> > > > > > Thanks & Regards
>>> > > > > > Srikanth
>>> > > > > > Software Developer
>>> > > > > > 
>>> > > > > > eGovernments Foundations
>>> > > > > > www.egovernments.org
>>> > > > > > Mob : 9980078913
>>> > > > > > 
>>> > > > > >
>>> > > > > >
>>> > > > > > On Fri, Jul 26, 2013 at 6:37 PM, Dave Newton <
>>> > davelnew...@gmail.com>
>>> > > > > > wrote:
>>> > > > > >
>>> > > > > > > Did you try `prepareWhateverMethodThatNeedsPrepare`? I don't
>>> > recall
>>> > > > if
>>> > > > > > that
>>> > > > > > > works or not.
>>> > > > > > >
>>> > > > > > >
>>> > > > > > > On Fri, Jul 26, 2013 at 7:24 AM, Sreekanth S. Nair <
>>> > > > > > > sreekanth.n...@egovernments.org> wrote:
>>> > > > > > >
>>> > > > > > > > No i can't do that, because that Action contains other
>>> method
>>> > > which
>>> > > > > > needs
>>> > > > > > > > P

Re: [struts 2] java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd

2013-08-07 Thread John Boyer
Hi Srikanth:

That fixed it. Thank you!

John

On Aug 7, 2013, at 10:41 AM, Sreekanth S. Nair 
 wrote:

> use this
> 
>"-//Apache Struts//XWork Validator 1.0.2//EN"
>   "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd";>
> 
> 
> -- 
> Regards
> Srikanth
> 
> On Wed, Aug 7, 2013 at 11:06 PM, John Boyer  wrote:
> 
>> Hi Martin:
>> 
>> Okay, but my validation XML is pointing to
>> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd, which is no
>> longer available. What should it point to now?
>> 
>> Thanks, John
>> 
>> ---
>> 
>> > 1.0.2//EN"
>>   "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>
>> 
>> 
>>
>>
>>Password is required
>>
>>
>> 
>>
>>
>>8
>>Password must be eight characters or
>> more.
>>
>>
>> 
>>
>>
>>Password is required
>>
>>
>> 
>>
>>
>>8
>>Password must be eight characters or
>> more.
>>
>>
>> 
>> 
>> 
>> On Aug 7, 2013, at 10:30 AM, Martin Gainty  wrote:
>> 
>>> Hi John
>>> 
>>> xwork-validator-1.0.2.dtd *should* be in xwork-core-.jar
>>> 
>>> jar -tvf xwork-.jar | grep xwork-validator
>>> 
>>> ?
>>> Martin Gainty
>>> __
>>> 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: j...@rodaxsoft.com
 Subject: [struts 2] java.io.FileNotFoundException:
>> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
 Date: Wed, 7 Aug 2013 10:14:21 -0700
 To: user@struts.apache.org
 
 Hi:
 
 Suddenly, in-production, we're getting file-not-found errors for the
>> xwork-validator-1.0.2.dtd at  http://www.opensymphony.com/xwork.
 
 How can resolve this problem? We're running Struts 2 v2.3.4.1
 
 Thanks, John
 
 -
 
 10:01:18 ERROR http-8443-1
>> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager - Caught
>> exception while loading file XXX-validation.xml
 http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd - Class:
>> sun.net.www.protocol.http.HttpURLConnection
 File: HttpURLConnection.java
 Method: getInputStream
 Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
 ceptor.intercept(I18nInterceptor.java:176)
 ...
 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:619)
 Caused by: java.io.FileNotFoundException:
>> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
 ...
 
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>> 
>> 


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



Re: Getting lists back from struts

2013-08-07 Thread Sreekanth S. Nair
Check this tutorial might help you
http://www.mkyong.com/struts2/how-to-set-default-value-for-multiple-checkboxes-in-struts-2/

-- 
Thanks & Regards
Srikanth
Software Developer

eGovernments Foundations
www.egovernments.org
Mob : 9980078913



On Wed, Aug 7, 2013 at 7:13 PM, Fabian Richter  wrote:

> Hi
>
> I have encountered this issue a couple of times, always found a way to
> code around but now I really need to ask:
>
> Can struts create lists/arrays (or whatever collection) when e.g. using
>
> public class MyAction extends ActionSupport {
>   public List getChoices() {
>  
>   }
>   
>   public List getPreSelectedChoices() {
>  // returns a list of Choice.getKey(), which is a String
>  
>   }
>  }
>
>  public class Choice {
>  public String getKey() { ...}
>  public String getDisplayName() { ... }
>  
>  }
>
> list="%{choices}"
>   listKey="%{'key'}"
>   listValue="%{'displayName'}"
>   value="%{preSelectedChoices}" />
>
> The selected values are sent to
>
> public void setMyChoice(String myChoice){
> ...
> }
>
> correct? There is no way somthing like
>
> public void setMyChoice(String[] myChoice){
> ...
> }
>
> works in struts?
>
> If not, whats the common way to get the values back from the String
> myChoice? Use Split on it?
>
> Thank you!
>
> Best
> Fabian
>
>


Re: [struts 2] java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd

2013-08-07 Thread Chris Pratt
I don't know if it's the latest, but
http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd appears to work.
  (*Chris*)


On Wed, Aug 7, 2013 at 10:36 AM, John Boyer  wrote:

> Hi Martin:
>
> Okay, but my validation XML is pointing to
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd, which is no
> longer available. What should it point to now?
>
> Thanks, John
>
> ---
> 
>  1.0.2//EN"
>"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>
> 
>
> 
> 
> Password is required
> 
> 
>
> 
> 
> 8
> Password must be eight characters or
> more.
> 
> 
>
> 
> 
> Password is required
> 
> 
>
> 
> 
> 8
> Password must be eight characters or
> more.
> 
> 
>
> 
>
> On Aug 7, 2013, at 10:30 AM, Martin Gainty  wrote:
>
> > Hi John
> >
> > xwork-validator-1.0.2.dtd *should* be in xwork-core-.jar
> >
> > jar -tvf xwork-.jar | grep xwork-validator
> >
> > ?
> > Martin Gainty
> > __
> > 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: j...@rodaxsoft.com
> >> Subject: [struts 2] java.io.FileNotFoundException:
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
> >> Date: Wed, 7 Aug 2013 10:14:21 -0700
> >> To: user@struts.apache.org
> >>
> >> Hi:
> >>
> >> Suddenly, in-production, we're getting file-not-found errors for the
> xwork-validator-1.0.2.dtd at  http://www.opensymphony.com/xwork.
> >>
> >> How can resolve this problem? We're running Struts 2 v2.3.4.1
> >>
> >> Thanks, John
> >>
> >> -
> >>
> >> 10:01:18 ERROR http-8443-1
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager - Caught
> exception while loading file XXX-validation.xml
> >> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd - Class:
> sun.net.www.protocol.http.HttpURLConnection
> >> File: HttpURLConnection.java
> >> Method: getInputStream
> >> Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
> >> ceptor.intercept(I18nInterceptor.java:176)
> >>  ...
> >>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
> >>  at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> >>  at java.lang.Thread.run(Thread.java:619)
> >> Caused by: java.io.FileNotFoundException:
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
> >>  ...
> >>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: [struts 2] java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd

2013-08-07 Thread Sreekanth S. Nair
use this

http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd";>


-- 
Regards
Srikanth

On Wed, Aug 7, 2013 at 11:06 PM, John Boyer  wrote:

> Hi Martin:
>
> Okay, but my validation XML is pointing to
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd, which is no
> longer available. What should it point to now?
>
> Thanks, John
>
> ---
> 
>  1.0.2//EN"
>"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>
> 
>
> 
> 
> Password is required
> 
> 
>
> 
> 
> 8
> Password must be eight characters or
> more.
> 
> 
>
> 
> 
> Password is required
> 
> 
>
> 
> 
> 8
> Password must be eight characters or
> more.
> 
> 
>
> 
>
> On Aug 7, 2013, at 10:30 AM, Martin Gainty  wrote:
>
> > Hi John
> >
> > xwork-validator-1.0.2.dtd *should* be in xwork-core-.jar
> >
> > jar -tvf xwork-.jar | grep xwork-validator
> >
> > ?
> > Martin Gainty
> > __
> > 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: j...@rodaxsoft.com
> >> Subject: [struts 2] java.io.FileNotFoundException:
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
> >> Date: Wed, 7 Aug 2013 10:14:21 -0700
> >> To: user@struts.apache.org
> >>
> >> Hi:
> >>
> >> Suddenly, in-production, we're getting file-not-found errors for the
> xwork-validator-1.0.2.dtd at  http://www.opensymphony.com/xwork.
> >>
> >> How can resolve this problem? We're running Struts 2 v2.3.4.1
> >>
> >> Thanks, John
> >>
> >> -
> >>
> >> 10:01:18 ERROR http-8443-1
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager - Caught
> exception while loading file XXX-validation.xml
> >> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd - Class:
> sun.net.www.protocol.http.HttpURLConnection
> >> File: HttpURLConnection.java
> >> Method: getInputStream
> >> Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
> >> ceptor.intercept(I18nInterceptor.java:176)
> >>  ...
> >>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
> >>  at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> >>  at java.lang.Thread.run(Thread.java:619)
> >> Caused by: java.io.FileNotFoundException:
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
> >>  ...
> >>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


RE: [struts 2] java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd

2013-08-07 Thread Martin Gainty
Hi John

xwork-validator-1.0.2.dtd *should* be in xwork-core-.jar

jar -tvf xwork-.jar | grep xwork-validator
 
?
Martin Gainty 
__ 
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: j...@rodaxsoft.com
> Subject: [struts 2] java.io.FileNotFoundException: 
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
> Date: Wed, 7 Aug 2013 10:14:21 -0700
> To: user@struts.apache.org
> 
> Hi:
> 
> Suddenly, in-production, we're getting file-not-found errors for the 
> xwork-validator-1.0.2.dtd at  http://www.opensymphony.com/xwork.
> 
> How can resolve this problem? We're running Struts 2 v2.3.4.1
> 
> Thanks, John
> 
> -
> 
> 10:01:18 ERROR http-8443-1 
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager - Caught 
> exception while loading file XXX-validation.xml
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd - Class: 
> sun.net.www.protocol.http.HttpURLConnection
> File: HttpURLConnection.java
> Method: getInputStream
> Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
> ceptor.intercept(I18nInterceptor.java:176)
>   ... 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
>   at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>   at java.lang.Thread.run(Thread.java:619)
> Caused by: java.io.FileNotFoundException: 
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
>   ...
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
  

Re: [struts 2] java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd

2013-08-07 Thread John Boyer
Hi Martin:

Okay, but my validation XML is pointing to 
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd, which is no longer 
available. What should it point to now?

Thanks, John

---

http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>




Password is required





8
Password must be eight characters or 
more.





Password is required





8
Password must be eight characters or 
more.





On Aug 7, 2013, at 10:30 AM, Martin Gainty  wrote:

> Hi John
> 
> xwork-validator-1.0.2.dtd *should* be in xwork-core-.jar
> 
> jar -tvf xwork-.jar | grep xwork-validator
> 
> ?
> Martin Gainty 
> __ 
> 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: j...@rodaxsoft.com
>> Subject: [struts 2] java.io.FileNotFoundException: 
>> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
>> Date: Wed, 7 Aug 2013 10:14:21 -0700
>> To: user@struts.apache.org
>> 
>> Hi:
>> 
>> Suddenly, in-production, we're getting file-not-found errors for the 
>> xwork-validator-1.0.2.dtd at  http://www.opensymphony.com/xwork.
>> 
>> How can resolve this problem? We're running Struts 2 v2.3.4.1
>> 
>> Thanks, John
>> 
>> -
>> 
>> 10:01:18 ERROR http-8443-1 
>> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager - Caught 
>> exception while loading file XXX-validation.xml
>> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd - Class: 
>> sun.net.www.protocol.http.HttpURLConnection
>> File: HttpURLConnection.java
>> Method: getInputStream
>> Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
>> ceptor.intercept(I18nInterceptor.java:176)
>>  ... 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
>>  at 
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>>  at java.lang.Thread.run(Thread.java:619)
>> Caused by: java.io.FileNotFoundException: 
>> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
>>  ...
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>> 
> 


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



Re: [struts 2] java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd

2013-08-07 Thread Sreekanth S. Nair
Try changing you xxx-validation.xml file dtd url declaration with the
latest available dtd inside xwork-core.jar

-- 
Thanks & Regards
Srikanth

On Wed, Aug 7, 2013 at 10:44 PM, John Boyer  wrote:

> Hi:
>
> Suddenly, in-production, we're getting file-not-found errors for the
> xwork-validator-1.0.2.dtd at  http://www.opensymphony.com/xwork.
>
> How can resolve this problem? We're running Struts 2 v2.3.4.1
>
> Thanks, John
>
> -
>
> 10:01:18 ERROR http-8443-1
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager - Caught
> exception while loading file XXX-validation.xml
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd - Class:
> sun.net.www.protocol.http.HttpURLConnection
> File: HttpURLConnection.java
> Method: getInputStream
> Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
> ceptor.intercept(I18nInterceptor.java:176)
> ...
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.io.FileNotFoundException:
> http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
> ...
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


[struts 2] java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd

2013-08-07 Thread John Boyer
Hi:

Suddenly, in-production, we're getting file-not-found errors for the 
xwork-validator-1.0.2.dtd at  http://www.opensymphony.com/xwork.

How can resolve this problem? We're running Struts 2 v2.3.4.1

Thanks, John

-

10:01:18 ERROR http-8443-1 
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager - Caught 
exception while loading file XXX-validation.xml
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd - Class: 
sun.net.www.protocol.http.HttpURLConnection
File: HttpURLConnection.java
Method: getInputStream
Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
ceptor.intercept(I18nInterceptor.java:176)
... 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException: 
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
...



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



Re: struts 1 to struts2 migration.

2013-08-07 Thread Arpan
Thank you so much Lukasz.. While migrating I found few more problems. Such
as

In struts 1 JSP I have used 
In scriplet there are many places we used <% String s = x.getName(); %>

In struts 2 we can write 

Now how can I use the "x" object in scriplet. As there are many references
of "x" already written, I don't want to change so much code for now. Hence
like to use scriplet only.

Thanks


On Wed, Aug 7, 2013 at 7:34 PM, Lukasz Lenart wrote:

> You can try to write your own ActionMapper which will extract request
> parameter "action" and base on that lookup for action.
>
> 2013/8/7 Arpan :
> > Anybody to help here...
> >
> > Thanks in Advance.
> >
> >
> > On Tue, Aug 6, 2013 at 7:43 PM, Arpan  wrote:
> >
> >> Hi All,
> >>
> >> We are migrating from struts1 to struts2.
> >>
> >> In our pages we have multiple buttons which through struts1
> DispatchAction
> >> can be guided  to different methods in Action class. For that we need
> >> minimal changes. Such as
> >>  In action mapping if we add parameter="action" and in JSP if the URL is
> >> like x.do?action=method1, it happily directs the control to method1 in
> >> Action class.
> >>
> >> I got the bellow link for struts2, but for that also we need much
> changes
> >> to be done.
> >>
> http://struts.apache.org/development/2.x/docs/multiple-submit-buttons.html
> >>
> >> Is there any such way we do similar functionality in struts2 with
> minimal
> >> changes.
> >>
> >> Thanks
> >>
> >>
> >>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: struts 1 to struts2 migration.

2013-08-07 Thread Lukasz Lenart
You can try to write your own ActionMapper which will extract request
parameter "action" and base on that lookup for action.

2013/8/7 Arpan :
> Anybody to help here...
>
> Thanks in Advance.
>
>
> On Tue, Aug 6, 2013 at 7:43 PM, Arpan  wrote:
>
>> Hi All,
>>
>> We are migrating from struts1 to struts2.
>>
>> In our pages we have multiple buttons which through struts1 DispatchAction
>> can be guided  to different methods in Action class. For that we need
>> minimal changes. Such as
>>  In action mapping if we add parameter="action" and in JSP if the URL is
>> like x.do?action=method1, it happily directs the control to method1 in
>> Action class.
>>
>> I got the bellow link for struts2, but for that also we need much changes
>> to be done.
>> http://struts.apache.org/development/2.x/docs/multiple-submit-buttons.html
>>
>> Is there any such way we do similar functionality in struts2 with minimal
>> changes.
>>
>> Thanks
>>
>>
>>

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



Re: struts 1 to struts2 migration.

2013-08-07 Thread Arpan
Anybody to help here...

Thanks in Advance.


On Tue, Aug 6, 2013 at 7:43 PM, Arpan  wrote:

> Hi All,
>
> We are migrating from struts1 to struts2.
>
> In our pages we have multiple buttons which through struts1 DispatchAction
> can be guided  to different methods in Action class. For that we need
> minimal changes. Such as
>  In action mapping if we add parameter="action" and in JSP if the URL is
> like x.do?action=method1, it happily directs the control to method1 in
> Action class.
>
> I got the bellow link for struts2, but for that also we need much changes
> to be done.
> http://struts.apache.org/development/2.x/docs/multiple-submit-buttons.html
>
> Is there any such way we do similar functionality in struts2 with minimal
> changes.
>
> Thanks
>
>
>


Getting lists back from struts

2013-08-07 Thread Fabian Richter

Hi

I have encountered this issue a couple of times, always found a way to 
code around but now I really need to ask:


Can struts create lists/arrays (or whatever collection) when e.g. using

public class MyAction extends ActionSupport {
  public List getChoices() {
 
  }
  
  public List getPreSelectedChoices() {
 // returns a list of Choice.getKey(), which is a String
 
  }
 }

 public class Choice {
 public String getKey() { ...}
 public String getDisplayName() { ... }
 
 }

 

The selected values are sent to

public void setMyChoice(String myChoice){
...
}

correct? There is no way somthing like

public void setMyChoice(String[] myChoice){
...
}

works in struts?

If not, whats the common way to get the values back from the String 
myChoice? Use Split on it?


Thank you!

Best
Fabian



smime.p7s
Description: S/MIME Kryptografische Unterschrift


Re: sj:select value problem

2013-08-07 Thread Lukasz Lenart
2013/8/7 David Wang :
> value="%{patternKeyword2}"   />

I don't know if this supports anything else than just a String. Please
ask question on the user group or directly under the wiki page

https://groups.google.com/forum/#!forum/struts2-jquery
https://code.google.com/p/struts2-jquery/wiki/SelectTag


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

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