Re: Migrating from Struts 1.2 to recent Struts

2019-03-12 Thread davidrobertwoosley
Dave,

The application uses 270 Tiles-based JSPs. It's a huge, complex user interface. 
How would you approach that?

Thanks, David.



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



Re: RE: Migrating from Struts 1.2 to recent Struts

2019-03-12 Thread davidrobertwoosley
Thanks Yasser. I'll check them out.

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



Re: Migrating from Struts 1.2 to recent Struts

2019-03-12 Thread davidrobertwoosley
Martin,

Excellent info. I may contact you directly via email.

Thanks.

David



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



Re: Migrating from Struts 1.2 to recent Struts

2019-03-12 Thread Martin Gainty
https://struts.apache.org/plugins/struts-1/
Struts 1 Plugin
back to Plugins Edit on GitHub Struts 1 Plugin. The Struts 1 plugin allows you 
to use existing Struts 1 Actions and ActionForms in Struts 2 applications. This 
plugin provides a generic Struts 2 Action class to wrap an existing Struts 1 
Action, org.apache.struts2.s1.Struts1Action.The wrapper class provides the 
expected calls to the legacy Struts 1 Action and ActionForm, converting 
incoming and ...
struts.apache.org

incorporate struts2-struts1-plugin to use existing struts1 actions and existing 
struts1 forms within struts2

as dave mentioned your first effort should be to update all of your web 
interfaces

hth


From: Dave Newton 
Sent: Monday, March 11, 2019 3:02 PM
To: Struts Users Mailing List
Subject: Re: Migrating from Struts 1.2 to recent Struts

Kind of depends what you're migrating it to. Roughly speaking you copy your
business logic as-is and rewrite the web interface side of things.


On Mon, Mar 11, 2019 at 2:16 PM davidrobertwoos...@gmail.com <
davidrobertwoos...@gmail.com> wrote:

> I'm forced to migrate a sizable application from Struts 1.2 to something
> recent, and I don't know where to start. I understand that Struts 1.2 is
> ~ancient~ history and no longer supported in any way, shape or form. But it
> must be done.
>
> How can I accomplish such a migration?
>
> Thanks,
>
> David
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

--
em: davelnew...@gmail.com
mo: 908-380-8699
tw: @dave_newton 
li: dave-newton 
gh: davelnewton 
so: Dave Newton 
bl[0]: Bucky Bits 
bl[1]: Maker's End Blog 
sk: davelnewton_skype


Re: HashMap with String as key

2019-03-12 Thread Prasanth Pasala
Lukasz,

There is no new keys in the hash map. The hash map is not updated at all. 
Before the form is displayed to the user, the hash map is populated based on 
the data in the database. These values are
correctly displayed to the user in the text fields. But when the form is 
submitted by the user the data doesn't get populated in the hash map. Only the 
data I have populated in the hash map is present
(as the model class is stored in session using scope interceptor) doesn't 
matter what values I type in the text fields.

Yasser,  That is right the key is a string, not long.

Also as I was testing this (having keys with and with out hyphen) I realized 
that any values that I have added to hash map before showing the form are still 
in the map. The new values from the form
(keys without hyphen) got added to the hash map. I was under the impression 
that struts would set a new hash map with just the keys present in the form.

Thanks,
Prasanth

On 3/12/19 4:12 AM, Yasser Zamani wrote:
> (regarding your previous emails background) Please also consider that the key 
> 2432-123 is not further Long. It's String.
>
> Regards.
>
>> -Original Message-
>> From: Lukasz Lenart 
>> Sent: Tuesday, March 12, 2019 10:52 AM
>> To: Struts Users Mailing List 
>> Subject: Re: HashMap with String as key
>>
>> pon., 11 mar 2019 o 18:41 Prasanth  napisał(a):
>>> When you have a HashMap backed form and String as key, are there any
>> restrictions on the characters allowed?
>>> I have keys like "2432-123" as I have to incorporate two ids in the
>>> key. When I have these keys the HashMap is not getting populated. If I 
>>> change
>> it, so that there is only one id (no hyphen) then the data is getting posted 
>> as
>> expected.
>>
>> I assume it's because of the "-" (minus) sign, and OGNL performs an 
>> evaluation or
>> something. Could you check if you have key 2309 in your map as a result of
>> distraction operation (2432-123 = 2309)?
>>
>>
>> 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
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>



RE: HashMap with String as key

2019-03-12 Thread Yasser Zamani
(regarding your previous emails background) Please also consider that the key 
2432-123 is not further Long. It's String.

Regards.

>-Original Message-
>From: Lukasz Lenart 
>Sent: Tuesday, March 12, 2019 10:52 AM
>To: Struts Users Mailing List 
>Subject: Re: HashMap with String as key
>
>pon., 11 mar 2019 o 18:41 Prasanth  napisał(a):
>> When you have a HashMap backed form and String as key, are there any
>restrictions on the characters allowed?
>>
>> I have keys like "2432-123" as I have to incorporate two ids in the
>> key. When I have these keys the HashMap is not getting populated. If I change
>it, so that there is only one id (no hyphen) then the data is getting posted as
>expected.
>
>I assume it's because of the "-" (minus) sign, and OGNL performs an evaluation 
>or
>something. Could you check if you have key 2309 in your map as a result of
>distraction operation (2432-123 = 2309)?
>
>
>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: Migrating from Struts 1.2 to recent Struts

2019-03-12 Thread Yasser Zamani
Hi David,

These are some useful resources I found via googling:

* Official Migration Guide: Struts 1 to Struts 2 [1]
* Stackoverflow answer: Migration from Struts 1 to Struts 2 [2]
* InfoQ Migration Guide, part one [3]

Thanks for using Struts!

Kind Regards.

[1] https://cwiki.apache.org/confluence/display/WW/Migration+Guide
[2] https://stackoverflow.com/a/20130845/1362623
[3] http://www.infoq.com/articles/converting-struts-2-part1


>-Original Message-
>From: Dave Newton 
>Sent: Monday, March 11, 2019 10:32 PM
>To: Struts Users Mailing List 
>Subject: Re: Migrating from Struts 1.2 to recent Struts
>
>Kind of depends what you're migrating it to. Roughly speaking you copy your
>business logic as-is and rewrite the web interface side of things.
>
>
>On Mon, Mar 11, 2019 at 2:16 PM davidrobertwoos...@gmail.com <
>davidrobertwoos...@gmail.com> wrote:
>
>> I'm forced to migrate a sizable application from Struts 1.2 to
>> something recent, and I don't know where to start. I understand that
>> Struts 1.2 is ~ancient~ history and no longer supported in any way,
>> shape or form. But it must be done.
>>
>> How can I accomplish such a migration?
>>
>> Thanks,
>>
>> David
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>--
>em: davelnew...@gmail.com
>mo: 908-380-8699
>tw: @dave_newton 
>li: dave-newton 
>gh: davelnewton 
>so: Dave Newton 
>bl[0]: Bucky Bits 
>bl[1]: Maker's End Blog 
>sk: davelnewton_skype


RE: Mapping struts.xml actions to their full URL

2019-03-12 Thread Yasser Zamani
Hi there,

The whole Struts itself is a servlet/filter defined in web.xml and you cannot 
divide your actions between multiple servlet/filter I think.

Regards.

>-Original Message-
>From: shonlevin1234@ 
>Sent: Monday, March 11, 2019 3:45 PM
>To: user@struts.apache.org
>Subject: Mapping struts.xml actions to their full URL
>
>As part of security tests we are doing, I have to map the actions appears in
>struts.xml to their full URLs. I know to connect between the namespace and the
>action name of every action from struts.xml, but how can I know which servlet
>refers to each action?
>
>For example, this is my struts.xml file-
>
>
>
>bar2.jsp
>
>
>
>I know that the URL contains the path "/barspace/bar.action" but how can I 
>build
>the rest of the URL (with the servlet prefix as well)?
>
>-
>To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>For additional commands, e-mail: user-h...@struts.apache.org



Re: HashMap with String as key

2019-03-12 Thread Lukasz Lenart
pon., 11 mar 2019 o 18:41 Prasanth  napisał(a):
> When you have a HashMap backed form and String as key, are there any 
> restrictions on the characters allowed?
>
> I have keys like "2432-123" as I have to incorporate two ids in the key. When 
> I have these keys the HashMap is not getting populated. If I change it, so 
> that there is only one id (no hyphen) then the
> data is getting posted as expected.

I assume it's because of the "-" (minus) sign, and OGNL performs an
evaluation or something. Could you check if you have key 2309 in your
map as a result of distraction operation (2432-123 = 2309)?


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: Spring Boot + Struts2 Convention Plugin Not Working

2019-03-12 Thread Lukasz Lenart
Hi

I think it's do the fact that the plugin won't scan JARs by default
https://struts.apache.org/plugins/convention/#actions-in-jar-files


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

pon., 11 mar 2019 o 18:39 Rubens Gomes  napisał(a):
>
> I using Spring Boot + Struts2, and the convention plugin is not working.  
> That, is the request URL paths are not being automatically mapped  to their 
> corresponding action classes at all.
>
> Spring Boot: 1.5.19.RELEASE
> Struts2: 2.5.20
> Java VM JDK 1.8
> Maven
>
> I have the struts2-convention-plugin in my maven POM dependencies.  And I 
> have registered the Struts2 StrutsPrepareAndExecuteFilter as a bean in Spring 
> Boot, and the filter gets called in  the request filter chain. However, it is 
> not resolving the incoming path to an action class using the convention 
> plugin.
>
> Below is a portion of my struts.xml:
> 
>  "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
> "http://struts.apache.org/dtds/struts-2.5.dtd;>
> 
>   
>   
>value="com.ezlista.web.struts2.action" />
>   
>value="ezlista-package" />
>   
>value="com.ezlista.web.struts2" />
>value="/WEB-INF/content/" />
>   
>   
>   
>   
>   
>   
>   
>   
>   
>
>   
> 
>   
> 
>   true
>   ERROR
>   com.ezlista
>name="params.excludeParams">dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,parameters\...*,^_csrf
> 
>   
> 
>
> 
> 
>   
> .
> 
>
> 
>
>

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