Re: PropertyPlaceholderConfigurer can't read file properties

2011-07-01 Thread Miguel Almeida
On Fri, 2011-07-01 at 08:46 -0500, Paul Benedict wrote: Can you clarify? You spoke about reloading -- are you trying to change property files on the fly? Agree: as far as I know, you can't do that with PropertyPlaceholderConfigurer. Also agree with previous mail: this is Spring, not Struts.

Can Struts Junit plugin be used to test the redirect result of an action

2011-09-21 Thread Miguel Almeida
with this base test case to make it call the 2nd action? Regards, Miguel Almeida

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Miguel Almeida
On Wed, 2011-09-21 at 17:55 +0200, Carl Ballantyne wrote: How can I try the nightly build if using Maven? I do not see it listed as an option. Would be nice if Struts released SNAPSHOT versions into maven. Does it? Be aware that you can write your test as follow: public void

Message lookup (from key) in Test

2011-11-16 Thread Miguel Almeida
is: assertEquals(expectedMessage, action.getActionErrors().iterator().next()); But actionErrors() contains the key (error.authorisation) and not the value (you cannot do this). What's the cleanest way to retrieve the value from the test? Cheers, Miguel Almeida

Maven archetypes not working?

2012-01-20 Thread Miguel Almeida
- https://repository.apache.org/content/groups/public/] The defined artifact is not an archetype While I've just added the catalog to my workspace, I have used maven archetypes before. Is there something not working with the archetypes at the moment? Cheers, Miguel Almeida

Testing with StrutsTestCase in a Tiles application - NullPointerException

2012-01-27 Thread Miguel Almeida
@struts.apache.org/msg77582.html ). Petrelli tried to answer, but no solution was posted. From these resources, do you know what the problem might be and if it is possible to use StrutsTestCase to test an application that has Tiles enabled through the StrutsTilesListener? Cheers, Miguel Almeida

Re: Testing with StrutsTestCase in a Tiles application - NullPointerException

2012-01-30 Thread Miguel Almeida
, WEB-INF/tiles.xml); final StrutsTilesListener tilesListener = new StrutsTilesListener(); final ServletContextEvent event = new ServletContextEvent(servletContext); tilesListener.contextInitialized(event); } } Miguel Almeida On Fri, 2012-01-27 at 17

Does the StrutsTestCase test filters defined in web.xml?

2012-05-14 Thread Miguel Almeida
suggest I perform this test? Thank you, Miguel Almeida [1]- see http://www.displaytag.org/1.2/export_filter.html

RE: Does the StrutsTestCase test filters defined in web.xml?

2012-05-14 Thread Miguel Almeida
outside the scope of struts and a manual inspection might suffice. However, I do want to explore other tools that are available to test the http request/response, so I'll look into this further. Cheers, Miguel Almeida Cheers, Steve -Original Message- From: Miguel Almeida [mailto:mig

Re: Using Spring proxied Session Beans with the ExecAndWaitInterceptor

2012-05-14 Thread Miguel Almeida
about http sessions or requests and should really be http agnostic). Could you clear me up on you meant by your approach? Thanks, Miguel Almeida On 05/14/2012 08:11 PM, Łukasz Lenart wrote: I think it's better to repackage what you need and pass as a context variables instead inject session aware

Re: Using Spring proxied Session Beans with the ExecAndWaitInterceptor

2012-05-16 Thread Miguel Almeida
Regarding this issue - and considering any interceptor, not just the ExecAndWaitInterceptor: 1) My issue was, in fact, that I was accessing the request/session scoped bean in my init method. The init method was being called at app startup, where no such context exists 2) If we remove that access,

Can we use the decorator pattern in Actions?

2012-05-16 Thread Miguel Almeida
question is: how would you go on and solve this? Or is the decorator approach impractical in Struts? I haven't even consider the necessity to implement every getter/setter on the IAction, which would also make this approach a bit cumbersome. The simplicity for testing, however, is great! Cheers, Miguel

Can you define variables as the value in struts.properties?

2012-06-18 Thread Miguel Almeida
I really need is struts.custom.i18n.resources=environments/app-${envName}. Can one have this, so only the file that makes sense for that environment is loaded? [1] https://gist.github.com/2948672 Cheers, Miguel Almeida

Re: data injection attack

2012-07-04 Thread Miguel Almeida
Lukas: that's not always viable though. You might need a setter for your model object elsewhere, but don't want that action to set that property. On Wed, 2012-07-04 at 14:57 +0200, Lukasz Lenart wrote: By removing setter for it ? Regards

Performance issue with nested iterator

2012-07-04 Thread Miguel Almeida
faster (ie, page load drops from 8 to 2 seconds). Looking at http://struts.apache.org/2.x/docs/performance-tuning.html, I double checked the OGNL version loaded in maven and indeed I have 3.0.3. Is there any obvious reason why I'm getting such a slow performance? Thanks for the input! Miguel Almeida

Re: Performance issue with nested iterator

2012-07-05 Thread Miguel Almeida
Sure, Lukas: https://github.com/mmalmeida/struts-performance On Thu, 2012-07-05 at 06:48 +0200, Lukasz Lenart wrote: Could you post somewhere (GitHub) the whole code base ? Regards

Re: Performance issue with nested iterator

2012-07-05 Thread Miguel Almeida
is using tiles, so I kept it there. However, I don't think it's being used in the web workflow I created (which just goes to index.jsp). Is there anything there that might explain this slowness? Cheers, Miguel Almeida On Thu, 2012-07-05 at 13:05 +0100, Miguel Almeida wrote: Sure, Lukas

Re: Performance issue with nested iterator

2012-07-05 Thread Miguel Almeida
. Updating to 2.3.19 makes performance normal again (the complete project needed freemarker, hence the direct dependency reference in the pom). While I don't know what changed between these freemarker versions, apparently the problem was there. Miguel Almeida On Thu, 2012-07-05 at 13:16 +0100

OGNL error in log - Error setting expression

2012-07-27 Thread Miguel Almeida
. It seems the question of whether or not these warnings should appear has been discussed in the mailing list before. What I couldn't find is this: should there even be a warning in this case, given that the property should be searched for in the i18n resources and not the action? Thank you, Miguel

Re: OGNL error in log - Error setting expression

2012-07-27 Thread Miguel Almeida
Answering my own question: apparently you need to define a name property for the submit tag. Thanks to http://www.coderanch.com/t/487063/Struts/Internationalization Miguel On Fri, 2012-07-27 at 18:33 +0100, Miguel Almeida wrote: I noticed some OGNL warnings in my log that I show below [1

Type conversion on a Map

2012-09-20 Thread Miguel Almeida
file wrong, the parameter set in the unit test, or both? Cheers, Miguel Almeida

RE: Type conversion on a Map

2012-09-21 Thread Miguel Almeida
initialised so this would fail as well This is where it is failing. Not because it hasn't been initialized, but because it doesn't have that key. Miguel Almeida

Re: Can we use the decorator pattern in Actions?

2012-10-03 Thread Miguel Almeida
Spring IoC to define these needed objects in OriginalAction. But it would be neat if that was performed by Struts. What are your thoughts on this? Miguel Almeida On Wed, 2012-05-16 at 11:22 +0100, Miguel Almeida wrote: Imagine the scenario where you have security implemented at the action method

Issue with maven archetypes - jetty plugin version 8 not refreshing JSPs

2012-10-29 Thread Miguel Almeida
configuration scanIntervalSeconds10/scanIntervalSeconds /configuration /plugin Does anyone know what configuration change is needed so you get the same behaviour as before? Miguel Almeida

Re: Issue with maven archetypes - jetty plugin version 8 not refreshing JSPs

2012-10-31 Thread Miguel Almeida
and security). Could you try the configuration without scanTargets for jetty 6 and 8? Miguel Almeida On Tue, 2012-10-30 at 21:57 +0100, Lukasz Lenart wrote: Hi, I've tested with apps/blank and it works as expected, the same with an app created base on struts2-archetype-blank (mvn

Re: Issue with maven archetypes - jetty plugin version 8 not refreshing JSPs

2012-11-07 Thread Miguel Almeida
timestamp and refreshes anyway, Jetty 8 is more sensitive and does not reload the file. So the solution here was simply to update the remote NFS server's clock. Why the NTP-aware server is having trouble with the time is another issue... Miguel Almeida On Tue, 2012-11-06 at 13:12 +0100, Lukasz

Private setter method breaking application in Tomcat7

2013-02-20 Thread Miguel Almeida
) Why is Tomcat7 the only container complaining? Neither tomcat6 nor our embedded jetty containers complain about this 2) Even though the method's name should be changed, I also find it strange that this is a problem when the 2nd method is private. Any thoughts appreciated, Miguel Almeida

Re: Struts application

2013-02-20 Thread Miguel Almeida
Or, if you already use Maven, use the Maven archetypes available at http://struts.apache.org/ Miguel Almeida On Wed, 2013-02-20 at 22:31 +0530, Umesh Awasthi wrote: download sample application from S2 official download section and you will be able to see how things are being configured

How to set the name parameter on a multiple s:select

2013-05-29 Thread Miguel Almeida
=true name=%{entity.entity2List[].entity3.id} list=#someList listKey=id listValue=code/ s:select key=centre.choose multiple=true name=entity.entity2List[].entity3.id list=#someList listKey=id listValue=code/ Thank you for your help! Miguel Almeida

Re: How to set the name parameter on a multiple s:select

2013-05-29 Thread Miguel Almeida
I've also posted this on http://stackoverflow.com/questions/16812357/how-to-set-the-name-parameter-on-a-multiple-sselect so the knowledge can be shared once the answer is known. I also plan to add this to struts' documentation! Miguel On Wed, 2013-05-29 at 11:27 +0100, Miguel Almeida wrote

Re: How to set the name parameter on a multiple s:select

2013-05-30 Thread Miguel Almeida
()); assertEquals(2, entity.getEntity2List().get(0).getEntity3().getId()); assertEquals(11, entity.getEntity2List().get(1).getEntity3().getId()); -Dale On May 29, 2013, at 6:27 AM, Miguel Almeida mig...@almeida.at wrote: Dear all, Imagine you have

Re: Struts 2.3.15.1 How to read external properties files or conf files

2013-09-06 Thread Miguel Almeida
Without any code it's hard to know what's happening. I do ask you to seriously reconsider refactoring database access out of the action or you'll end up with a huge, very hard to test action class. Miguel Almeida On Fri, 2013-09-06 at 10:50 +0100, Chris wrote: Where : server side , in action

s:token doesn't accept data- attributes, cssClass ignored

2013-10-02 Thread Miguel Almeida
Hi, I am creating an ajax call for a method which is protected by the TokenSessionStoreInterceptor. This means I need to pass the token onto the request. I was expecting the s:token tag to accept data-foo=bar attributes (they'd be passed along to the corresponding hidden elements), but this is

Re: security impact after enabling back the action: prefix in Struts 2.3.15.3

2013-11-26 Thread Miguel Almeida
is that the normal behaviour will return in both situations on a future non-security release - hopefully the next one! Maybe someone from the dev team can share their input with us? Kind regards, Miguel Almeida On Wed, 2013-11-20 at 04:33 +0100, Krassen Deltchev wrote: Dear Struts2 mailing list, i have

Re: Sending email on uncought exception problems

2013-11-26 Thread Miguel Almeida
The first thought I had was also that this might be better suited on an interceptor. You'll also have more control over the desired behaviour since interceptors are more easily testable than JSPs. Miguel On Tue, 2013-11-26 at 09:43 -0500, Dave Newton wrote: Why not use an interceptor? Dave

Re: S2 - custom tag with Spring

2013-12-04 Thread Miguel Almeida
If you @Autowire something into your class you're essentially doing the same as retrieving the resources from ApplicationContext. Once you define your class as a Spring bean in Spring's configuration (either by explicitly defining it in an XML or because it's in a classpath which you've told

Re: Token Session Interceptor and back button

2013-12-06 Thread Miguel Almeida
Paul, I was thinking about this example...what did you have in mind as a way to achieve that, tough, i.e., that a browser back refreshes the page? I can only see some javascript method/hack for that. Were you thinking of something else? Miguel On Thu, 2013-12-05 at 14:59 -0600, Paul Benedict

Re: Is Struts 2.3.15.2 affected by the security vulnerability S2-018?

2013-12-17 Thread Miguel Almeida
Lukasz, Just to be sure, does that mean that if you use 2.3.15.3 and you set the flag to enable the action: prefix it means you'll get the old behaviour (and vulnerability) back? Miguel On Mon, 2013-12-16 at 08:27 +0100, Lukasz Lenart wrote: 2.3.15.2 and 2.3.15.3 address the same issue, but

Re: Is Struts 2.3.15.2 affected by the security vulnerability S2-018?

2013-12-17 Thread Miguel Almeida
On Tue, 2013-12-17 at 11:40 +0100, Lukasz Lenart wrote: 2013/12/17 Miguel Almeida mig...@almeida.at: Lukasz, Just to be sure, does that mean that if you use 2.3.15.3 and you set the flag to enable the action: prefix it means you'll get the old behaviour (and vulnerability) back

Re: minimal set of jar files for struts 2.3

2014-01-06 Thread Miguel Almeida
Lukasz, Incidentally, is this list compiled by hand or is it built automatically using a (which?) maven plugin? Miguel On Sat, 2014-01-04 at 13:18 +0100, Lukasz Lenart wrote: The first section compile and optional No http://struts.apache.org/release/2.3.x/xwork-core/dependencies.html

Re: Best book reference for struts 2

2014-01-16 Thread Miguel Almeida
I've found Dave Newton's Apache Struts to be one of the best Struts books out there. Miguel On Thu, 2014-01-16 at 14:17 +0530, Arvind Gupta wrote: Struts2 by Vincent is really good for starting out. Also have a look at this one from infoq http://www.infoq.com/minibooks/starting-struts2

Re: Best book reference for struts 2

2014-01-16 Thread Miguel Almeida
On Thu, Jan 16, 2014 at 7:35 AM, Miguel Almeida mig...@almeida.at wrote: I've found Dave Newton's Apache Struts to be one of the best Struts books out there. Miguel On Thu, 2014-01-16 at 14:17 +0530, Arvind Gupta wrote: Struts2 by Vincent is really good for starting out. Also

Is the email regex validator in Struts validation incorrect?

2014-08-25 Thread Miguel Almeida
on this? Could this regex be incorrect and miss out any special characters? Miguel Almeida

Re: Is the email regex validator in Struts validation incorrect?

2014-08-25 Thread Miguel Almeida
] http://tools.ietf.org/html/rfc6531 Cheers, Paul On Mon, Aug 25, 2014 at 10:46 AM, Miguel Almeida mig...@almeida.at wrote: This is the regex for email validation in Struts: \\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)\* \.([a-z]{2}|aero|arpa|asia|biz|com

Re: Is the email regex validator in Struts validation incorrect?

2014-08-25 Thread Miguel Almeida
. Note that other email validators can be plugged in fairly easily. Dave On Mon, Aug 25, 2014 at 12:11 PM, Miguel Almeida mig...@almeida.at wrote: I have added it to the JIRA - https://issues.apache.org/jira/browse/WW-4389 I can't seem to find the actual standard though

S:url and s:param and character encoding

2014-08-29 Thread Miguel Almeida
I had an issue recently with a download action not finding the corresponding file and you might be able to help me with it. The filename (on disk) was Calendário (á is the focus here). I am using the following s:url (Calendário is within the variable #answer):

Re: S:url and s:param and character encoding

2014-09-01 Thread Miguel Almeida
On Mon, 2014-09-01 at 10:20 +0200, Lukasz Lenart wrote: 2014-08-29 18:11 GMT+02:00 Miguel Almeida mig...@almeida.at: I had an issue recently with a download action not finding the corresponding file and you might be able to help me with it. The filename (on disk) was Calendário (á

Can you use type conversion with JSONInterceptor?

2016-12-01 Thread Miguel Almeida
Imagine SearchAction{ private List evaluatedRecords; } Record is an interface so to get auto-wiring to work you'd usually set-up a SearchAction-conversion.properties: KeyProperty_evaluatedRecords=id Element_evaluatedRecords=com.bibliovigilance.model.RecordImpl CreateIfNull_evaluatedRecords=true

Re: Can you use type conversion with JSONInterceptor?

2016-12-02 Thread Miguel Almeida
Thank you Lukasz! I will check if/how we can inject the converter there. If we manage to get it working in a way that helps the ticket resolution I'll also post the information there. On Sex, 2016-12-02 at 09:50 +0100, Lukasz Lenart wrote: > Hi, > > JSON plugin uses its own conversation

Re: Can we use the decorator pattern in Actions?

2017-03-31 Thread Miguel Almeida
0-04 at 08:05 +0200, Lukasz Lenart wrote: > 2012/10/3 Miguel Almeida <mig...@almeida.at>: > > I was speaking with Lukasz today about this, so I'm resurrecting this > > old thread. > > > > The underlying question in my (rather extensive) post is: > > > &

Apache Struts 2.3.35 Upgrade - backward incompatibility in s:if

2018-08-29 Thread Miguel Almeida
We upgraded from 2.3.34 to 2.3.35 in one of our applications, but although the upgrade is described as backwards compatible, we found a problem in the UI. The simplified example is as follows. *Given* a JSP with: foo bar *And *scopesValues was

Re: Apache Struts 2.3.35 Upgrade - backward incompatibility in s:if

2018-08-30 Thread Miguel Almeida
Thanks Lukasz, On Thu, Aug 30, 2018 at 10:03 AM Lukasz Lenart wrote: > czw., 30 sie 2018 o 10:40 Miguel Almeida > napisał(a): > > Out of curiosity, is the problem the conversion from List to XWorkList > > mentioned > > by Yasser > > < > https://i

Re: Apache Struts 2.3.35 Upgrade - backward incompatibility in s:if

2018-08-30 Thread Miguel Almeida
about this incompatibility? Going forward, is there a way to improve the compatibility assessments? Kind regards, Miguel On Thu, Aug 30, 2018 at 7:21 AM Lukasz Lenart wrote: > śr., 29 sie 2018 o 19:04 Miguel Almeida > napisał(a): > > *And *scopesValues was previously set ( > value=&q