validation xmls in a Struts2 application with no Internet connection

2013-12-14 Thread Yasser Zamani
Hi there, We have a Struts2 application with some validation XMLs with following DOCTYPE: !DOCTYPE validators PUBLIC -//Apache Struts//XWork Validator 1.0.3//EN http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd; When we run this application on a server which has access to

Re: validation xmls in a Struts2 application with no Internet connection

2013-12-15 Thread Yasser Zamani
: 2013/12/14 Yasser Zamani yasser.zam...@live.com: Hi there, We have a Struts2 application with some validation XMLs with following DOCTYPE: !DOCTYPE validators PUBLIC -//Apache Struts//XWork Validator 1.0.3//EN http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd; When we run

Re: validation xmls in a Struts2 application with no Internet connection

2013-12-16 Thread Yasser Zamani
I could not re-produce it with most recent version, 2.3.16. Both DTD versions work correctly on an off-line Tomcat :) I think there is a mis-version-configuration between struts and xwork with that non-maven old application. Sorry for the inconvenience! Thanks! On 12/15/2013 03:53 PM,

Re: Where does the message ( age ) come from in trunk/struts2examples/annotations/

2013-12-27 Thread Yasser Zamani
Hi, It has been done by /xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java inside Struts. By default, all conversion errors are reported using the generic i18n key xwork.default.invalid.fieldvalue, which you can override (the default text is Invalid field

Re: FW: Struts2 - Open page in same tab

2017-08-14 Thread Yasser Zamani
hod ="POST"; > document.regSubmitForm.action = url; > document.regSubmitForm.submit(); > } > > -Original Message- > From: Yasser Zamani [mailto:yasser.zam...@live.com] > Sent: Saturday, August 12, 2017 12:12 AM > To: user@struts.

Re: FW: Struts2 - Open page in same tab

2017-08-12 Thread Yasser Zamani
Hello, Sorry for late answer. I thought dev mailing list also receives user mails but now I subscribed to user mailing list and I have your mails on my radar hereafter. Although this is not a Struts issue, I reviewed your jsp and I think if your submitEPay function works and opens a popup

Re: No container in actions after upgrading to 2.5.13

2017-09-13 Thread Yasser Zamani
Maybe you have a similar issue of [1]. Say you have X that extends ActionSupport. Please make sure if every X has been instantiated not manually (e.g. X = new X() inside your java files). They should be instantiated via Strut's object factory ( e.g.

Re: No container in actions after upgrading to 2.5.13

2017-09-14 Thread Yasser Zamani
t; I’ve attached it to this message as a text file. > > Later, > > Andy > > > >> On 12 Sep 2017, at 15:56, Yasser Zamani <yasser.zam...@live.com> wrote: >> >> Each one you're more comfortable or is more important for you. >> >> On 9/12/2017 7

Re: Struts 2.5 ParameterAware and HttpParametersAware

2017-09-16 Thread Yasser Zamani
I reviewed Strut's internal codes and seems following works: import org.apache.struts2.dispatcher.HttpParameters; import org.apache.struts2.dispatcher.Parameter; import org.apache.struts2.interceptor.HttpParametersAware; import java.util.HashMap; import java.util.Map; /** * Created by user on

Re: Which Struts Version To Use?

2017-09-18 Thread Yasser Zamani
On 9/18/2017 7:35 PM, Phillips, Bruce A wrote: > We still have a couple of web apps that are using Struts version 2.3.32 > > We want to update those web apps to the latest version of Struts but I’m not > sure what version to update to. > > I see a 2.5.13 and a 2.3.34 – both tags seem to be

Re: Which Struts Version To Use?

2017-09-18 Thread Yasser Zamani
On 9/18/2017 7:35 PM, Phillips, Bruce A wrote: > We still have a couple of web apps that are using Struts version 2.3.32 > > We want to update those web apps to the latest version of Struts but I’m not > sure what version to update to. > > I see a 2.5.13 and a 2.3.34 – both tags seem to be

Re: Which Struts Version To Use?

2017-09-18 Thread Yasser Zamani
On 9/18/2017 7:35 PM, Phillips, Bruce A wrote: > We still have a couple of web apps that are using Struts version 2.3.32 > > We want to update those web apps to the latest version of Struts but I’m not > sure what version to update to. > > I see a 2.5.13 and a 2.3.34 – both tags seem to be

Re: Which Struts Version To Use?

2017-09-19 Thread Yasser Zamani
. Sincerely Yours, Yasser. On 9/18/2017 8:21 PM, Yasser Zamani wrote: > > > On 9/18/2017 7:35 PM, Phillips, Bruce A wrote: >> We still have a couple of web apps that are using Struts version 2.3.32 >> >> We want to update those web apps to the latest version of Struts but &

Re: No container in actions after upgrading to 2.5.13

2017-09-19 Thread Yasser Zamani
On 9/19/2017 11:43 AM, LAW Andy wrote: > >> On 14 Sep 2017, at 16:03, Yasser Zamani <yasser.zam...@live.com> wrote: >> >> Do last three exceptions occur in same time, in one action call (I think >> because of first word of their lines 73709, 73712 and 73716 an

Re: Issues in Struts Migration from v2.2.1.1 to v2.3.34

2017-09-23 Thread Yasser Zamani
Hello Palani, I could not guess how that issue is related to Struts? Is that table or it's parent or parents generated by Struts? On 9/22/2017 6:58 PM, Palani, Sambasivam wrote: > Hi Team, > > We are migrating our application from Struts v2.2.1.1 to Struts v2.3.34 to > fix the vulnerability

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-04 Thread Yasser Zamani
On 10/4/2017 9:19 AM, sreekanth wrote: > thanks Yasser, that info was great, so do you think so the way struts2 binds > BigDecimal changed between these two versions ? I found the difference at [1]. That is in order to fix WW-4581 [2]. [1]

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-04 Thread Yasser Zamani
On 10/4/2017 10:45 AM, sreekanth wrote: > thanks Yasser, let me setup a sample too. I already went through fixes > introduced at WW-4581 as well and ran a test against it and found that's not > the reason for this behavior rather something related to form field binding. > > Here i'm adding your

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread Yasser Zamani
On 10/3/2017 8:26 PM, sreekanth wrote: > Hi, > We have a List object which is getting set at JSP (element added > dynamically in front end), while saving this form the object's value for > BigDecimal fields are getting null. > > eg: > > Class A { > String strVal; > BigDecimal drAmt; >

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread Yasser Zamani
On 10/3/2017 9:56 PM, sreekanth wrote: > The value not getting set at all, its coming as null. By the time i will also > see if i can provide some log as you mentioned. > I tested similar action with a list of A where A has two BigDecimals; posted values (myList[x].y] getting set here however

Re: Decimal digits change when upgrading from 2.5.10.1 to 2.5.12

2017-10-09 Thread Yasser Zamani
On 10/9/2017 8:59 AM, Lukasz Lenart wrote: > - request a change via JIRA As Struts converts to/from strings, to keep backward-compatibility, maybe it's better to setMaximumFractionDigits to possible max value that can accepts; This avoids loss of user's data caused by rounding like previous

Re: Odd results with get vs post for an action and form

2017-10-15 Thread Yasser Zamani
On 10/15/2017 4:23 AM, Dave Weis wrote: > If I set the method in the form to "get" it works fine but if I > leave it to default to "post" I receive the following error. It seems you have REST Plugin in your box and when you use http post method, Struts looks for a method named `create` on your

Re: org.apache.jasper.JasperException struts-examples-master crud

2017-10-14 Thread Yasser Zamani
On 10/14/2017 5:43 AM, albert kao wrote: > Messages: > /WEB-INF/jsp/persons.jsp (line: 13, column: 8) Attribute id invalid for tag > url according to TLD Hello Albert, Thanks for your report. It seems struts-examples need some fixes which are under processing at [1]. Regards, Yasser. [1]

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-14 Thread Yasser Zamani
On 10/13/2017 12:47 PM, Ej Magdaluyo wrote: > *"com.MyRequestAction"*> > > /viewMyRequest.jsp > > I have no idea how above works in your previous app!! I guess that is an another bug in your app. You don't have `/viewMyRequest.jsp` (rather than `/jsp/viewMyRequest.jsp`) so maybe you get

Re: Decimal digits change when upgrading from 2.5.10.1 to 2.5.12

2017-10-14 Thread Yasser Zamani
On 10/13/2017 6:29 PM, Matias Rodriguez wrote: > IMHO > the limitation should be done by a formatter, not in a converter, > delegating the formatting to the user's hands. I agree. Please track the resolution on the JIRA ticket at [1]. Thanks for your report, Yasser. [1]

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Yasser Zamani
On 10/12/2017 4:03 PM, Ej Magdaluyo wrote: > *if*(fileRequestWrapper!=*null* & > .getErrors()!=*null*){ I worked and found the bug :) the new version of MultiPartRequestWrapper instantiates it's `error` inside it's constructor. So you should rewrite above as:

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Yasser Zamani
On 10/12/2017 11:14 AM, Ej Magdaluyo wrote: > > /addAccess Your action has returned "fileSizeError" but only "success" has defined. > No result defined for action com.MyRequestAction and result fileSizeError - > action > >

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Yasser Zamani
On 10/12/2017 11:44 AM, Ej Magdaluyo wrote: > I would just like to confirm if it is expected that we would need to add > a fileSizeError result. This is because the code was working in Struts > 2.2.3, and the error only appeared post-migration. I reviewed the > migration notes, and I am not

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-13 Thread Yasser Zamani
On 10/13/2017 9:14 AM, Lukasz Lenart wrote: > I think we can fix it in 2.5.14 That is a bug inside Ej's custom interceptor, I think.

Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread Yasser Zamani
I recently have resolved very similar issue at [1]. That was because of wrong PUBLIC ID in his validator xmls. But in general, please add to your struts.xml and configure log4j2 for your application [2] and then run your application and review it's output for any warnings. I guess you should

Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread Yasser Zamani
I sense you may think Struts uses Spring to inject Container. No, "Internally, the framework uses its own dependency injection container that is very similar to Google Guice" [1]. So do not worry about Spring and it's auto-wiring. Did you try "devmode=true" and then examining output for any

Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread Yasser Zamani
No, "DEBUG" level is not interesting for me now. Also, as I saw, it seems this specific message is not dependent to devMode value [1]. Could you please reduce your log4j2 root level to only log "WARN" ? so it'll be less puffy and simpler to examine. Then please check if devMode works, open

Re: Error Struts 2.3.33

2017-09-13 Thread Yasser Zamani
On 9/12/2017 11:09 PM, Yasser Zamani wrote: > I should correct myself; You can write it in both #session['foo'] or > #session.foo > > So, now you should examine that previousBusinessStateList exists in > session on that action call which return that jsp including s:select

Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread Yasser Zamani
Each one you're more comfortable or is more important for you. On 9/12/2017 7:08 PM, LAW Andy wrote: > >> On 12 Sep 2017, at 14:46, Yasser Zamani <yasser.zam...@live.com> wrote: >> >> Great! they mean devMode works. >> >> Could you post your whole stacktrac

Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread Yasser Zamani
t; value ['true', ] > > > Followed by the now-traditional NPE-based errors because the Container isn’t > being set in the Action. > > This is now running 2.3.12 Struts on 8.0.21 Tomcat. > > Later, > > Andy > > > >> On 12 Sep 2017, at 10:43, Yas

Re: Error Struts 2.3.33

2017-09-12 Thread Yasser Zamani
It means you have Can someone take a look at this and tell me what exactly it means and > possibly how to resolve? My log file fills up with these. > 12:43:57,952 ERROR > [org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler] > (ajp-jbappprd4/172.26.11.62:8409-4) Exception occurred

Re: Error Struts 2.3.33

2017-09-12 Thread Yasser Zamani
I should correct myself; You can write it in both #session['foo'] or #session.foo So, now you should examine that previousBusinessStateList exists in session on that action call which return that jsp including s:select tag. On 9/12/2017 11:02 PM, Yasser Zamani wrote: > It means you h

Re: Struts 2.3.16 to 2.3.33

2017-09-12 Thread Yasser Zamani
The [1] writes: > you need to specify > > struts.multipart.saveDir= > property in either struts.xml file as a constant entry or you need to specify > that in struts.properties file choice is all yours. > > struts.multipart.saveDir - The directory where the uploaded files will be > placed. If

Re: Issues in Struts Migration from v2.2.1.1 to v2.3.34

2017-09-25 Thread Yasser Zamani
Hello Palani, I could not guess how that issue is related to Struts? Is that table or it's parent or parents generated by Struts? On 9/25/2017 1:29 PM, Palani, Sambasivam wrote: > Hi Team, > > We are migrating our application from Struts v2.2.1.1 to Struts v2.3.34 to > fix the vulnerability

Re: About Oracle Security Alert Advisory - CVE-2017-9805

2017-09-25 Thread Yasser Zamani
Hello Emi, According to [1] and [2], yes. It's code is S2-052 and resolved in 2.3.34 and 2.5.13. [1] http://mail-archives.apache.org/mod_mbox/www-announce/201709.mbox/%3CCAMopvkNPG--EVqRtg4rO0G1bYrJ0cgYiBh=P=o2poezq8kv...@mail.gmail.com%3E [2]

Re: Question about upgrade to struts2 2.3.34 and session variables

2017-09-26 Thread Yasser Zamani
; getSession() { > return Session; > } > Thank you! So could you please also check if replacing all session.userList with session['userList'] resolves this issue? > Adding # before session didn't solve the issue. > > Thanks, > > Lana > >

Re: Question about upgrade to struts2 2.3.34 and session variables

2017-09-26 Thread Yasser Zamani
On 9/26/2017 7:41 PM, Roslyakova, Svetlana wrote: > Here is the full example: > > > Does your action have getSession() method? As I remember, to access session we should use #session e.g. #session.userList or #session['userList'] > > > > "> type="text" id="userId"

Re: How to put Spring object in Struts application scope on web startup?

2017-09-30 Thread Yasser Zamani
Hello Burton, I tested following and seems works but I did not tested if objects are equal by reference (you may get different objects e.g. when scope is prototype): ```java public class MYStrutsPrepareFilter implements Filter { public void doFilter(ServletRequest req,

Re: Extending StrutsTypeConverter :: How to detect specific type of "Class toClass"?

2017-10-01 Thread Yasser Zamani
}"<#rt/> > <#if parameters.disabled!false> > disabled="disabled"<#rt/> > > /> > > > Thoughts? Any reason this would cause issues elsewhere? > > On Sun, Oct 1, 2017 at 1:37 PM, Burton Rhodes <bu

Re: Extending StrutsTypeConverter :: How to detect specific type of "Class toClass"?

2017-10-02 Thread Yasser Zamani
On 10/2/2017 11:00 AM, Lukasz Lenart wrote: > was off for few days to take few > off-road rides on my dirty bike;-) :) cool! I hope you did not reach any issue with your bike's Struts :) Just joking! welcome back Łukasz! Actually such days traverses hardly for me as I do not hear about you

Re: Extending StrutsTypeConverter :: How to detect specific type of "Class toClass"?

2017-10-01 Thread Yasser Zamani
Hello Burton, Thank you; I examined your example and found out this behavior is because of something in Struts named "automatic checkbox detection", CheckboxInterceptor. When your `choices` count is bigger than 1, you'll see your desired behavior because CheckboxInterceptor does nothing with

Re: Extending StrutsTypeConverter :: How to detect specific type of "Class toClass"?

2017-09-25 Thread Yasser Zamani
Hello Burton, I could post back lists without any custom converter as below: ```jsp ``` But about your question: Java uses something called "type erasure", which means at runtime both List and List are equivalent. The compiler knows the

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-08-26 Thread Yasser Zamani
I checked it's codes and seems ok. It has a dependency to struts 2.5.12 which has (not optional) dependency to commons lang3 3.6. So you should have commons lang3 3.6 in your war lib. Do you? Or maybe you have lower version of commons lang3 jar in your tomcat lib? Please check both. albert kao

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-04 Thread Yasser Zamani
2.jar >>> hello-world/WEB-INF/lib/struts2-core-2.5.12.jar >>> hello-world/WEB-INF/lib/freemarker-2.3.23.jar >>> hello-world/WEB-INF/lib/log4j-core-2.8.2.jar >>> hello-world/WEB-INF/lib/log4j-api-2.8.2.jar >>> hello-world/WEB-INF/lib/commons-io-2.4.j

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-04 Thread Yasser Zamani
lang3* > /home/alkao/Struts2/struts-2.5.12/lib/commons-lang3-3.6.jar > > Therefore the helloworld link in index.jsp did not see the > /home/alkao/Struts2/struts-2.5.12/lib/commons-lang3-3.6.jar. > > > On Sat, Sep 2, 2017 at 2:46 PM, Yasser Zamani <yasser.zam...@live.com> >

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-02 Thread Yasser Zamani
o-world/WEB-INF/lib/commons-lang3-3.6.jar > > However, the helloworld link in index.jsp did not see it. > > > On Sat, Aug 26, 2017 at 7:43 PM, Yasser Zamani <yasser.zam...@live.com> > wrote: > >> I checked it's codes and seems ok. It has a dependency to struts 2.5.12 >

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-05 Thread Yasser Zamani
ang3-3.5.jar] > [Loaded org.apache.commons.lang3.CharSequenceUtils from > file:/home/alkao/tomee/apache-tomee-plus-7.0.3/lib/commons-lang3-3.5.jar] > ... > > > On Mon, Sep 4, 2017 at 1:30 PM, Yasser Zamani <yasser.zam...@live.com> > wrote: > >>>> Although I had don

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread Yasser Zamani
On 10/3/2017 10:33 PM, sreekanth wrote: > Thanks Yasser, if my previous doubts get cleared then probably i can assume > there is behavioral change in binding empty value. If thats not the case > then will try to replicate as you have mentioned. > In my yesterday test application, empty string

Re: Iusse in BigDecimal conversion after upgrading from 2.5.10.1 to 2.5.13

2017-10-03 Thread Yasser Zamani
On 10/4/2017 8:07 AM, sreekanth wrote: > thanks Yasser, may i know with which version of struts you have tested it > 2.5.10.1 or 2.5.13 ? > 2.5.13. But now I also tested 2.5.10.1 and get following warn when try to set empty string value to a BigDecimal: Unexpected Exception caught setting

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Yasser Zamani
On 10/12/2017 8:48 AM, Ej Magdaluyo wrote: > No result defined for action com.MyRequestAction and result fileSizeError Could you please post it's complete stack trace? - To unsubscribe, e-mail:

Re: Question about upgrade to struts2 2.3.34 and session variables

2017-09-26 Thread Yasser Zamani
elated WARN. [1] https://struts.apache.org/docs/devmode.html > -Original Message- > From: Yasser Zamani [mailto:yasser.zam...@live.com] > Sent: Tuesday, September 26, 2017 1:49 PM > To: user@struts.apache.org > Subject: Re: Question about upgrade to struts2 2.3.34 and sess

Re: Log4j 2 configuration in struts 2.5.x

2017-10-24 Thread Yasser Zamani
On 10/24/2017 2:06 PM, ravirajmishr...@gmail.com wrote: > Can Anyone help me with the log4j 2 configuration in struts 2.5.x application. You correctly ask this in user list but please don't cross post to dev list. Please see Guides of [1]. [1] http://struts.apache.org/mail.html

Re: Struts 2 JSP Taglib error

2017-10-24 Thread Yasser Zamani
On 10/24/2017 10:10 AM, ravirajmishr...@gmail.com wrote: > java.lang.ClassCastException: org.apache.tiles.jsp.taglib.UseAttributeTag > cannot be cast to javax.servlet.jsp.tagext.Tag There are several possible things. Please search the web for "cannot be cast to javax.servlet.jsp.tagext.Tag"

Re: Migration from Struts1 to Struts2.5

2017-11-15 Thread Yasser Zamani
On 11/15/2017 6:56 PM, JK wrote: Caused by: org.apache.tiles.TilesException: Unable to resolve factory class: 'org.apache.struts2.tiles.StrutsTilesContainerFactory' It seems you don't have Struts Tiles Plugin 2.5.13 in your classpath. Please try below in your pom.xml:

Re: Converting struts1 tag to struts2 null handling

2017-11-24 Thread Yasser Zamani
On 11/24/2017 3:31 PM, heberr...@gmail.com wrote: > > > How to make this true when #row.type is null. I tested below instead, and works: However, you pointed an important note out. It caused that I think maybe it was better to throw an NPE in such cases. Thanks for your report, Yasser.

Re: Unable to integrate struts2-rest-plugin in existing maven structure

2017-12-02 Thread Yasser Zamani
On 12/1/2017 7:13 PM, Adam Brin wrote: > Apologies if I missed something earlier, but can you do a dependency search > in your project and see if you already have a version of net.sf.json.lib > included elsewhere? perhaps an older (or newer) version is conflicting? > Also see your published

Re: java.lang.ClassCastException: org.apache.struts2.dispatcher.mapper.ActionMapping

2017-12-15 Thread Yasser Zamani
Could you please register this issue at [1] with title "Support for cross context request processing" then we will keep it in monitor and you can track resolution there, thanks for your report! On 12/16/2017 2:24 AM, Prasanth Pasala wrote: > Do you see any side effects of this? I'm not sure.

Re: java.lang.ClassCastException: org.apache.struts2.dispatcher.mapper.ActionMapping

2017-12-18 Thread Yasser Zamani
On 12/18/2017 8:33 PM, Prasanth Pasala wrote: > Added it to Struts JIRA (WW-4904) Thank you very much for your time and report! > If I set the struts.actionMapping attribute to null it still causes the > class cast exception. What I have seen is that after setting it to null if > you call >

Re: java.lang.ClassCastException: org.apache.struts2.dispatcher.mapper.ActionMapping

2017-12-15 Thread Yasser Zamani
On 12/15/2017 2:16 AM, Prasanth Pasala wrote: > ServletContext sContext = context.getContext("/context2"); > RequestDispatcher rd = sContext.getRequestDispatcher(resource); > rd.forward(request, response); > > Thanks, > Prasanth > > Exception: java.lang.RuntimeException:

Re: java.lang.ClassCastException: org.apache.struts2.dispatcher.mapper.ActionMapping

2017-12-15 Thread Yasser Zamani
On 12/15/2017 11:45 AM, Yasser Zamani wrote: > > > On 12/15/2017 2:16 AM, Prasanth Pasala wrote: >> ServletContext sContext = context.getContext("/context2"); >> RequestDispatcher rd = sContext.getRequestDispatcher(resource); >> rd.forward(request,

Re: java.lang.ClassCastException: org.apache.struts2.dispatcher.mapper.ActionMapping

2017-12-15 Thread Yasser Zamani
On 12/15/2017 9:47 PM, Prasanth wrote: > Is this issue just with Struts2, as it works with Struts1. No it's not a Struts issue. You don't see this in Struts1 because maybe it doesn't use any object bounded to dispatched request. But Struts2 wants to ActionMapping mapping =

Re: Action bean cannot get correct utf-8 character

2017-12-18 Thread Yasser Zamani
On 12/19/2017 1:38 AM, Emi wrote: > Value entered é in jsp > > > (3) Action bean get value:   é. > > > Can someone let me know what config is wrong/missing please? Have you checked your container (e.g. tomcat, jetty, etc) config? for example in tomcat, add "URIEncoding="UTF-8"

Re: NullPointerException - com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) of "Apache Struts 2 Web Application Development" book

2017-11-12 Thread Yasser Zamani
On 11/12/2017 2:28 AM, albert kao wrote: > java.lang.NullPointerException > com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) I just googled "needsReloading(FileManager.java:209)" and found [1] :) it seems has been a bug and has fixed in 2.1.8. [1]

Re: s:select selected option from a list based on a condition

2017-11-20 Thread Yasser Zamani
On 11/20/2017 5:00 PM, heberr...@gmail.com wrote: >list="students" listKey="sid" listValue="name" > value="defaultStudent.equals('true')" > /> > > I have a select tag as above. The Student object has a boolean value > defaultStudent with getter isDefaultStudent. How to pre-select the

Re: Struts2.x ActionError And ActionMessage

2017-11-16 Thread Yasser Zamani
On 11/16/2017 8:09 PM, Dhulipudi, Sivannarayana wrote: > when ever validation failed, I want to create one action error message and > keep that action error in context Hello Dhulipudi, Welcome! Could you try below please ActionSupport myCurrentActionSupport = (ActionSupport)

Re: Struts2.x ActionError And ActionMessage

2017-11-16 Thread Yasser Zamani
On 11/17/2017 9:12 AM, Yasser Zamani wrote: > Hello Dhulipudi, Welcome! > > Could you try below please > > ActionSupport myCurrentActionSupport = (ActionSupport) > ActionContext.getContext().getValueStack().peek(); > > myCurrentActionSupport.addActionError("

Re: scopedModelDriven and ScopedModelDrivenInterceptor

2017-11-05 Thread Yasser Zamani
On 11/6/2017 4:12 AM, albert kao wrote: > please provide more explanation and source code examples. I think it is like ModelDriven but in ModelDriven you can have the model only in that action but in ScopedModelDriven you can have the model shared between actions in larger scopes `request`

Re: Error on line 25, column 9 in template/simple/radiomap.ftl

2017-11-08 Thread Yasser Zamani
On 11/8/2017 3:49 PM, albert kao wrote: > However, the same error occurred when my jsp page is changed to the > following. > Please help. Thanks. > > > > I think you want something like where myGoodList is a List If you want to simply show radio buttons list, radio tag can do

Re: Error on line 25, column 9 in template/simple/radiomap.ftl

2017-11-06 Thread Yasser Zamani
On 11/6/2017 4:37 PM, Yasser Zamani wrote: > then define myGoodList as List As you want to use inside an iterator, I think you want myGoodList as List<List>.

Re: Error on line 25, column 9 in template/simple/radiomap.ftl

2017-11-06 Thread Yasser Zamani
On 11/6/2017 2:53 PM, albert kao wrote: > listValue="value"/> I see that myGoodList is List and String does not have properties named key and value. Please try defining a class named MyGood which has getKey and getValue methods then define myGoodList as List.

Re: Unable to integrate struts2-rest-plugin in existing maven structure

2017-12-01 Thread Yasser Zamani
On 12/1/2017 3:50 PM, PATIL Preetam wrote: > > net.sf.json-lib > json-lib > 2.4 > Could you try jdk15 i.e. net.sf.json-lib json-lib 2.4

Re: Interceptor implementing SessionAware interface

2017-12-03 Thread Yasser Zamani
On 12/4/2017 3:00 AM, saravana2...@gmail.com wrote: > setSession() method is not called even after implementing sessionAware ServletConfigInterceptor calls setSession but only on action, not on previous or next interceptors: if (action instanceof SessionAware) {

Re: Struts 2.5.14.1 version - Security fixes - Need clarifications

2017-12-06 Thread Yasser Zamani
On 12/6/2017 11:03 PM, upendar devu wrote: > since the vulnerability is found in the latest > jackson library. but we are using version 2.7 and not the latest version > ; do you think the the issue still exist with version 2.7 ? Unfortunately I'm not in detail. You may ask at [1] as a comment

Re: Unable to use 'categories' in an action name

2017-12-10 Thread Yasser Zamani
On 12/10/2017 6:06 PM, Dave Weis wrote: > Correct, I want 'categories' to be the correct action name. I made a > duplicate with a different name but the same class and results and it works > fine. If I remove the first action I put in to test/reproduce this I still > get the same error. > > I

Re: Struts 2.5.14.1 version - Security fixes - Need clarifications

2017-12-06 Thread Yasser Zamani
On 12/6/2017 9:40 PM, upendar devu wrote: > is this impact for those using Struts based REST plugin ? CVE-2017-15707 [1] is for those using Struts' REST Plugin [2]. Before 2.5.14.1 this plugin uses json-lib library [3] which is not updated for several years and is vulnerable. After 2.5.14

Re: Struts 2.3.X Impacted by S2-055?

2017-12-10 Thread Yasser Zamani
On 12/8/2017 9:41 PM, info...@unixcert.net wrote: > It looks like the Jackson-databind issue is only associated with 2.5.X > versions of Struts. It's only with 2.5.14. Addressed in 2.5.14.1. But both 2.5.(x<14) and 2.3.x are impacted by S2-054. > I just want to confirm that 2.3.X versions

Re: Unable to use 'categories' in an action name

2017-12-10 Thread Yasser Zamani
On 12/9/2017 9:12 PM, Dave Weis wrote: >

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-25 Thread Yasser Zamani
On 10/25/2017 5:32 PM, Ej Magdaluyo wrote: > This is a really difficult issue to troubleshoot:( I love difficult issues ;) could you please backup that jsp's contents then replace it's contents with just a simple string like "I am viewMyRequest.jsp" then run and see what happens?

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-25 Thread Yasser Zamani
On 10/25/2017 8:20 PM, Ej Magdaluyo wrote: > Would you have any ideas? I think it furthermore is not a Struts issue, nor Tiles issue and you can revert back to tiles result. It seems there is an issue with raw java codes in that jsp. See if [1] can help. [1]

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-26 Thread Yasser Zamani
On 10/26/2017 12:11 PM, Ej Magdaluyo wrote: > Thanks for all your input. After narrowing it down, the 403 forbidden is > caused by these lines: > java.util.List classficationList = ViewReqDetails.getClassficationList(); > java.util.List reqLineAttributesUIList=ViewReqDetails. >

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-24 Thread Yasser Zamani
On 10/24/2017 4:21 PM, Ej Magdaluyo wrote: > is it possible to directly call the jsp from struts.xml > instead? Absolutely. try removing `type='tiles'` and correct the path (add `/jsp/`) as below: /jsp/viewMyRequest.jsp - To

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-24 Thread Yasser Zamani
On 10/24/2017 6:11 PM, Ej Magdaluyo wrote: > Unfortunately, we are getting the 403 error using that as well. I am not > sure why though. It seems as if the application is not able to access the > jsp folder on this action. > > I tried that path on our pre-migrated version and there were no

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-24 Thread Yasser Zamani
On 10/24/2017 7:35 PM, Ej Magdaluyo wrote: > It seems that the viewMyRequest.jsp is the only one with the issue. Would > you have any clue as to what may be the cause of this permission issue? So you should come back to tile result because the problem is with that jsp file itself then your

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-25 Thread Yasser Zamani
On 10/25/2017 12:41 PM, Ej Magdaluyo wrote: > it still returns a > 403 error with the new jsp file I remember you use WebLogic. Please enable it's debug logging and examine it's output (search viewMyRequest and see above and belog log lines). I guess it should say why it throws 403?

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-31 Thread Yasser Zamani
On 10/30/2017 7:06 PM, Ej Magdaluyo wrote: > viewMyRequest.jsp: > > ViewReqDetailsVO ViewReqDetails = > (ViewReqDetailsVO)request.getAttribute("ViewReqDetails"); > java.util.List classficationList = ViewReqDetails.getClassficationList(); > > A null value is being returned here, which is most

Re: log.debug not showing on console

2017-10-31 Thread Yasser Zamani
On 10/30/2017 5:45 PM, ravirajmishr...@gmail.com wrote: > > > > > > I think this is the cause and you should rewrite like below additivity="true"> However, it is

Re: Request parameter value different from instance variable value

2018-05-08 Thread Yasser Zamani
On 5/7/2018 8:35 PM, Prasanth wrote: > When I get the value from request object (request.getParameter("page");) it > returns "ChangePassword". What does 'String[] pages = request.getParameterValues("page");' return (it's length and values)? Regards.

Re: Struts2 login action class seems to be reused

2018-05-15 Thread Yasser Zamani
On 5/15/2018 12:45 AM, Prasanth Pasala wrote: > A different issue is coming up now after the get methods are removed.  > Getting the below exception some times when you request the login page, at > which point the browser doesn't have the session id > yet, the session id mentioned would be a

Re: Struts2 login action class seems to be reused

2018-05-17 Thread Yasser Zamani
On 5/16/2018 11:51 PM, Prasanth wrote: > Would struts2 call this setRequest method even if the class is implementing > just ServletRequestAware? No. Additionally Struts RequestAware method signature is setRequest(Map request); i.e. it's parameter is Map not ServletRequest. >

Re: Struts2 login action class seems to be reused

2018-05-16 Thread Yasser Zamani
On 5/16/2018 7:23 PM, Prasanth Pasala wrote: > Exception: java.lang.IllegalStateException: UT10: Session is invalid > r4yb7BtBx7fwmGbzMhgeyhvSFb3sAp6FhW6m-5Op > at > io.undertow.server.session.InMemorySessionManager$SessionImpl.getAttribute(InMemorySessionManager.java:481 > at >

Re: s:fielderror not working in Java 8, WebSphere

2018-05-23 Thread Yasser Zamani
On 5/23/2018 11:29 PM, Doug Breaux wrote: > Looks the same: > > java TestForStruts > COPY ME 1: public abstract int java.util.Set.size() > COPY ME 2: 0 Thanks. Sorry, for last one, could you check: java.util.Map lhm = new java.util.LinkedHashMap<>(); Class c = lhm.getClass();

Re: s:fielderror not working in Java 8, WebSphere

2018-05-24 Thread Yasser Zamani
On 5/22/2018 10:54 PM, breaux@ wrote: > 2018-05-22 12:43:24,384 ERROR [freemarker.runtime]: error - Error executing > FreeMarker template > FreeMarker template error: > Java method "AbstractCollection.size()" threw an exception when invoked on > LinkedHashMap$LinkedKeySet object "[]"; see

Re: s:fielderror not working in Java 8, WebSphere

2018-05-24 Thread Yasser Zamani
On 5/24/2018 6:43 PM, Doug Breaux wrote: > I'm not sure if I misunderstood the threading here, or just missed this test > case, but this one does seem to run the same on IBM Java 8: > > java TestForStruts2 > COPY ME 1: class java.util.LinkedHashMap$LinkedKeySet > COPY ME 2: public abstract int

Re: Struts2 login action class seems to be reused

2018-05-15 Thread Yasser Zamani
On 5/16/2018 6:59 AM, Prasanth Pasala wrote: > We have two applications (websites) to make it easier for users we have a > third site that acts as a common login place. Once the user enters the > username and password it determines the right site to use and does a forward > to that context

Re: s:fielderror not working in Java 8, WebSphere

2018-05-23 Thread Yasser Zamani
On 5/23/2018 5:38 PM, Doug Breaux wrote: > Quite possibly. Hoping somebody here will be able to confirm or give some > additional hints. Could you check with latest version of IBM JDK 8? And are you maybe able to check also with Oracle and OpenJDK 8?

Re: s:fielderror not working in Java 8, WebSphere

2018-05-23 Thread Yasser Zamani
On 5/23/2018 8:56 PM, Doug Breaux wrote: > This is the latest IBM JDK 8. Or at least the latest that works with our > version WebSphere, but it's very recent. The build date is 20180214. And this > WebSphere cannot use Oracle or OpenJDK. Thanks. Could you also check if your IBM JDK 8 is able

  1   2   3   >