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: 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: 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: Help : Disable Strict Method Invocation for struts 2 rest plugin

2018-04-30 Thread Yasser Zamani
On 4/30/2018 11:27 AM, Lukasz Lenart wrote: > The problem is that we should support existing configurations (like > automatically define allowed methods for those used in struts.xml). Sorry, I didn't get again :( AFAIK defined actions with any defined method in struts.xml are callable. However,

Re: Help : Disable Strict Method Invocation for struts 2 rest plugin

2018-04-29 Thread Yasser Zamani
On 4/26/2018 4:03 PM, Lukasz Lenart wrote: > Thinking on solution ... not so easy :( I couldn't understand what's the user expected behavior and what we should try to fix. Because of security, SMI is enabled by default and user has to annotate or define allowed methods. right? I think there are

Re: Support for sub-resources in struts 2 rest plugin

2018-04-29 Thread Yasser Zamani
On 4/27/2018 11:45 AM, DevaGerald wrote: > Hi, > > Sorry if i miss something here. As of my knowledge, the struts 2 rest plugin > supports only the following : > /resource - GET > /resource - POST > /resource/$resource_id - GET > /resource/$resource_id - PUT > /resource/$resource_id - DELETE >

Re: Struts2 login action class seems to be reused

2018-04-24 Thread Yasser Zamani
On 4/23/2018 11:50 PM, Prasanth Pasala wrote: > Get rid of the get methods in LoginAction, is this in /Context2 (application > where the issue is occurring) or /Context1 (which forwards the requests to > /Context2)? > That contexts who forwards request (Context1 I think) but you may do for

Re: Struts2 login action class seems to be reused

2018-04-23 Thread Yasser Zamani
On 4/23/2018 10:12 PM, Prasanth Pasala wrote: > The user is inputting username and password in /Context1, if I send a > redirect they would have to enter username/password again in /Context2. > No, you already have them. I think you can use Struts PostbackResult [1] in /Context1/LoginAction

Re: Struts2 login action class seems to be reused

2018-04-23 Thread Yasser Zamani
On 4/23/2018 8:04 PM, Prasanth Pasala wrote: > Found this one also but for almost all, the root size was 3. Below one was > anomaly. > Root Size: 4 > Result: null > Object: com.opensymphony.xwork2.DefaultTextProvider@4d36d73d > Object: com.nqadmin.webaccess.LoginAction@7f716c46 > Object:

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-21 Thread Yasser Zamani
On 4/21/2018 3:05 PM, Martin Gainty wrote: > i could'nt find it in servlet-api spec? > > https://tomcat.apache.org/tomcat-8.0-doc/servletapi/javax/servlet/http/HttpServletResponse.html > > HttpServletResponse (Servlet 3.1 API Documentation >

Re: Struts2 login action class seems to be reused

2018-04-21 Thread Yasser Zamani
On 4/19/2018 4:39 PM, Prasanth Pasala wrote: > There is a index.jsp which is defined as default page in web.xml it just > forwards the request to Login.action. There is no chaining of actions in > struts itself. We do have a LoginFilter which verifies > if a user is logged in. > So maybe

Re: Struts2 login action class seems to be reused

2018-04-19 Thread Yasser Zamani
On 4/19/2018 7:21 AM, Prasanth Pasala wrote: >   > com.opensymphony.xwork2.interceptor.ChainingInterceptor.copyStack(ChainingInterceptor.java:153) >   > com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:143) Thanks! These lines show Struts doesn't set

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-18 Thread Yasser Zamani
On 4/18/2018 5:27 PM, Martin Gainty wrote: > MG2>some confusion on where session is accessed > * available. This is because actions are built on a single-thread model. The > * only way to pass data is through the session > MG2>with chain interceptor No it didn't mean "with chain interceptor"

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-18 Thread Yasser Zamani
On 4/18/2018 1:21 AM, Martin Gainty wrote: > MG>AFAIK a redirect terminates the old session and creates a new session I think redirect to same domain:ip in same browser tab page should keep session. > MG>a better alternative is to implement ChainingInterceptor with type="chain"> e.g. As

Re: Struts2 login action class seems to be reused

2018-04-17 Thread Yasser Zamani
On 4/16/2018 7:19 PM, Prasanth Pasala wrote: > So I am wondering where did these values come from into the instance > variables? Great! Please also get the current stack trace inside your action's setUsername method and save it in a private string field inside your action. Then when action and

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-17 Thread Yasser Zamani
On 4/17/2018 3:53 PM, Burton Rhodes wrote: > That's a great thought. I think the session method makes more sense. Glad to hear :) thanks! I would like to add that you also can delete ExecAndWait interceptor. Then just save posted data in db and immediately send a thank you message to your

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-17 Thread Yasser Zamani
On 4/17/2018 6:42 AM, Burton Rhodes wrote: > Also, How would I include everything except the email body field with the > s:url tag? Unfortunately, I couldn't find a simple way :( However, as a workaround, instead, in your email form jsp, could you put the email body field as a POST param and

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-16 Thread Yasser Zamani
On 4/15/2018 11:39 PM, Burton Rhodes wrote: > I have been getting "Bad Request" or "URL too long" errors on occasion for > an email form that uses the execute and wait interceptor. I am using the > to resubmit the form per the documentation. > > "/> > > However, the original form submits via

Re: Simple example of Struts plugin, extending TextField

2018-04-16 Thread Yasser Zamani
On 4/16/2018 9:10 AM, mli...@x76.eu wrote: > Hi, > I'm looking for a simple example on how to extend the textfield tag to > only allow for certain input and display the value in a certain form > when the field is initially displayed. > > So the plugin handles the input validation via a

Re: Triple select tag

2018-04-16 Thread Yasser Zamani
On 4/15/2018 12:01 AM, albert kao wrote: > My requirement is triple select tag component implemented with Struts 2 > only, without any JS function. > I am still learning how s:doubleselect tag works. > I downloaded the source code from >

Re: Help : Disable Strict Method Invocation for struts 2 rest plugin

2018-04-14 Thread Yasser Zamani
On 4/11/2018 11:11 AM, Lukasz Lenart wrote: > 2018-04-09 16:59 GMT+02:00 DevaGerald : >> Thanks a lot Lukasz. >> >> I have resolved it by adding >> regex:[a-zA-Z]* in my >> struts.xml >> >> Do I have any alternative for this? > > No but I didn't want to suggest this as

Re: Fwd: Type conversion collection with interface type elements

2018-04-06 Thread Yasser Zamani
On 4/5/2018 6:52 PM, Nuno Oliveira wrote: > Your fix worked :) and I see why it did not work, thank you. > > Also yes, you are right, it should be Role instead of Roles but it is a > legacy class and the change implies a lot of fixes. It's on the "to do > list". > > Once more, thank you.

Fwd: Type conversion collection with interface type elements

2018-04-05 Thread Yasser Zamani
[copy with removed links to avoid detection as spam] Forwarded Message Subject: Re: Type conversion collection with interface type elements Date: Thu, 5 Apr 2018 13:02:01 + From: Yasser Zamani <yasserzam...@apache.org> Reply-To: Struts Users Mailing List

Re: Type conversion collection with interface type elements

2018-04-05 Thread Yasser Zamani
On 4/4/2018 7:20 PM, Nuno Oliveira wrote: > Hi, > > I am having problems populating an action variable Set by request using > struts type conversion if the Set has the element type defined as an > interface. > I have a UserAction-conversion.properties file with the following > configuration

Re: Struts2 login action class seems to be reused

2018-03-17 Thread Yasser Zamani
identity hash code of the LoginAction object to see if both records are inserted via a same action object. Thanks in advance for your support! > On 03/16/2018 02:13 PM, Yasser Zamani wrote: >> And you confirm that those log record insertions are only possible via >> LoginAction.ex

Re: Struts2 login action class seems to be reused

2018-03-16 Thread Yasser Zamani
tty standard struts.xml just declaration of action and the class along with the results (tiles results). Nothing other than that. On 03/16/2018 11:55 AM, Yasser Zamani wrote: On 3/16/2018 1:49 AM, Prasanth Pasala wrote: We do have login time, using that and the IP to correlate that with the

Re: Struts2 login action class seems to be reused

2018-03-16 Thread Yasser Zamani
On 3/16/2018 1:49 AM, Prasanth Pasala wrote: > We do have login time, using that and the IP to correlate that with the > access logs. Not all login entries have corresponding POST entries in access > log, so those would be our problems occurrences. > They actual correspond to a GET entry from

Re: Struts2 login action class seems to be reused

2018-03-15 Thread Yasser Zamani
On 3/15/2018 5:21 PM, Prasanth Pasala wrote: > User2 would have logged in some time before that, some times with in a minute > before that. I haven't seen any requests from User2 exactly at the time of > GET request from User1. It's strange :) Are login log records have same field values for

Re: Struts2 login action class seems to be reused

2018-03-15 Thread Yasser Zamani
On 3/14/2018 5:43 PM, Prasanth Pasala wrote: > We had a user report it soon after the deployment. After that we started > looking into the specific user who reported (User1) and the user (whose > information was seen by the reporting user) say User2. > We realized there are login entries from

Re: Struts2 login action class seems to be reused

2018-03-13 Thread Yasser Zamani
On 3/10/2018 1:22 AM, Prasanth Pasala wrote: > Ran tests with 1000 users logging in in 60sec while simultaneously 1000 users > just requesting login page in 60 sec to see if any of them would get in with > out username/password. No luck. System seems > to be working properly. Also tried

Re: Extra row appear in my jsp page after the Submit button is pressed

2018-03-11 Thread Yasser Zamani
On 3/12/2018 6:03 AM, albert kao wrote: >name="persons[%{#stat.count}].name"/> I guess using #stat.index (instead of #stat.count) solves this issue. Count will be 1,2 and 3 but Index will be 0,1 and 2 which is same as that index that java uses. Regards.

Re: Struts2 login action class seems to be reused

2018-03-08 Thread Yasser Zamani
On 3/8/2018 6:42 PM, Prasanth Pasala wrote: > Wish I was able to consistently reproduce it. I have two thread groups in > JMeter one thread group requests login page then logs in. Another thread > group just requests login page. I have tried this > with 100 users, 250 users in each thread

Re: Struts2 login action class seems to be reused

2018-03-08 Thread Yasser Zamani
On 3/7/2018 11:23 PM, Prasanth Pasala wrote: > If it is a session crossover we would display another user information > without making a login entry. In the cases where we had issue the code > recognized that there is no active session and went to the > authentication part, authenticated the

Re: Struts2 login action class seems to be reused

2018-03-07 Thread Yasser Zamani
On 3/7/2018 7:34 PM, Prasanth wrote: > I can't say that 2 percent of users were able to get in without > username/password. As I have ran the JMeter tests a lot of times (each run > with 100 users). Only during one of those runs of JMeter I > had 2 requests get users home page when

Re: Struts2 login action class seems to be reused

2018-03-07 Thread Yasser Zamani
On 3/6/2018 9:42 PM, Prasanth Pasala wrote: > In StrutsPrepareAndExecuteFilter below is the line that gets the action > mapping, since the forceLookup is set to true the PrepareOperations class > might be creating it again. > ActionMapping mapping = prepare.findActionMapping(request, response,

Re: Struts2 login action class seems to be reused

2018-03-07 Thread Yasser Zamani
On 3/5/2018 7:48 PM, Prasanth wrote: > For replicating the issue I was directly accessing /context2/Login.action. So > /context1 was not used in testing. Please let me repeat what I understood; When some users are signed in into /context1, you browses /context2/Login.action via JMeter empty

Re: BUG in struts-2.5.15

2018-03-06 Thread Yasser Zamani
On 3/6/2018 5:34 PM, liemngu...@ups.com.INVALID wrote: > To Struts2 developers, > > I have tested your upcoming struts-2.5.16 on Weblogic server for below bug. I > did not this error anymore. Good Job everyone. > > https://issues.apache.org/jira/browse/WW-4920 > I'm very glad to hear this!

Re: Struts2 login action class seems to be reused

2018-03-05 Thread Yasser Zamani
On 3/5/2018 7:48 PM, Prasanth wrote: > But the Login filter had the below lines to make sure forwarded requests from > /context1 > would work. > > request.setAttribute("struts.actionMapping", new ActionMapping()); Please let me discuss this line first of all. I'm still surprised how context2

Re: Action chaining not forwarding ModelDriven model properties

2018-03-03 Thread Yasser Zamani
On 2/28/2018 3:47 PM, shahzad.ismail@ wrote: > I've debugged it a bit and able to figure out that, initially, at the start > of action1, request.getParamater("modelprop") is null then I set modelprop in > the action1 method which makes mymodel.modelprop == "something" and >

Re: Struts2 login action class seems to be reused

2018-03-03 Thread Yasser Zamani
On 3/3/2018 12:37 AM, Prasanth Pasala wrote: > I was able to replicate the issue today. Asked few users to keep logging in > and ran jmeter to access login page, with out putting any username or > password. Out of the 100 attempts 2 attempts were > successful in getting in with out

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

2018-03-03 Thread Yasser Zamani
On 3/1/2018 10:12 PM, Prasanth wrote: > I will get back to you with the exception I was getting if you don't set the > valueStack to null. No, I meant why request.setAttribute("struts.actionMapping", null) not work there (like your request.setAttribute("struts.valueStack", null))? Why

Re: Dynamically generating multiple sets of radio buttons

2018-03-02 Thread Yasser Zamani
On 2/27/2018 4:37 PM, Dave Weis wrote: > value="1500"/>HOTTER > public void setVariation(HashMap variationItem){ > > logger.error("setVariation was called with variations"); > > for (Map.Entry entry : variationItem.entrySet()) { > String

Re: BUG in struts-2.5.15

2018-02-19 Thread Yasser Zamani
On 2/19/2018 5:35 PM, liemngu...@ups.com.INVALID wrote: > Yasser Zamani, > Here is the output: > COPY ME, > url2.toString=zip:file:/C:/Oracle/Middleware/Oracle_Home12.2.1.0.0/user_projects/domains/iwa_local_domain/servers/AdminServer/tmp/_WL_user/IWA/zfd81u/war/WEB-INF/lib/stru

Re: BUG in struts-2.5.15

2018-02-16 Thread Yasser Zamani
On 2/16/2018 10:14 AM, Yasser Zamani wrote: > > On 2/15/2018 7:32 PM, liemngu...@ups.com.INVALID wrote: >> Here is the output: >> >> COPY ME: >> weblogic.utils.zip.ZipURLConnection:zip:C:/Oracle/Middleware/Oracle_Home12.2.1.0.0/user_projects/domains/iwa_local_

Re: BUG in struts-2.5.15

2018-02-15 Thread Yasser Zamani
On 2/15/2018 7:32 PM, liemngu...@ups.com.INVALID wrote: > Here is the output: > > COPY ME: >

Re: BUG in struts-2.5.15

2018-02-15 Thread Yasser Zamani
On 2/15/2018 7:15 PM, Martin Gainty wrote: > I found > "C:/Oracle/Middleware/Oracle_Home12.2.1.0.0/user_projects/domains/iwa_local_domain/servers/AdminServer/tmp/_WL_user/IWA/zfd81u/war/WEB-INF/lib/struts2-core.jar". > I believe struts-default.xml is within struts2-core.jar (renamed from >

Re: BUG in struts-2.5.15

2018-02-15 Thread Yasser Zamani
On 2/14/2018 7:13 PM, liemngu...@ups.com.INVALID wrote: > Hi all, > > Testing your upcoming struts-2.5.15, when starting Weblogic server (Weblogic > server version 12.2.1.2.0, JDK v 1.8.0_101), we see exception below. > > Thanks, > Liem. > > >

Re: Conversion Error Interceptor prevent errors for empty values

2018-02-14 Thread Yasser Zamani
On 2/14/2018 5:13 PM, Paul Zepernick wrote: > Yes, I have it happening on 2.5.14.1. I have a select box pointing at a > Integer like this: auditForm.incorrectAuditReason.id I am using the rest > plugin which is including it in the stack. I have attached the source from > Maven. Where is

Re: Conversion Error Interceptor prevent errors for empty values

2018-02-14 Thread Yasser Zamani
On 2/13/2018 8:06 PM, Paul Zepernick wrote: > Can someone provide some clarification on if this interceptor should be > adding a field error when an empty string is passed to a Integer in the > action? No, it should not be happening for `conversionError` interceptor. Does it happen? > I am

Re: Suspicious Request

2018-02-13 Thread Yasser Zamani
On 2/13/2018 3:57 PM, Rajvinder Pal wrote: > I am using struts2 2.3.16.1 version. That may be the reason 404 error is > returned. But still i got a new file "one.jsp", inside the WAR. It has > only one IF condition as give below:- > > <%if(request.getParameter("f")!=null)(new >

Re: Suspicious Request

2018-02-13 Thread Yasser Zamani
On 2/13/2018 12:34 PM, Rajvinder Pal wrote: > Hi, > > I have a struts application deployed on application server. Some time I am > receiving the below requests in web server logs. Not sure if i can post it > in this struts forum. What should i do to restrict it?What kind of > vulnerability it

Re: Lang

2018-02-10 Thread Yasser Zamani
On 2/9/2018 9:17 PM, Deborah White wrote: > I have this: > > > > It doesn't seem to like lang=es > > Help? Do you look for something like below described at [1]? es [1] https://struts.apache.org/getting-started/message-resource-files.html#internationalization-i18n

Re: newFixedThreadPool in struts2

2018-02-10 Thread Yasser Zamani
On 2/10/2018 12:32 AM, Emi wrote: > Hello Yasser, >> You can write your own listener by implementing HttpSessionListener >> and call shutdown in it's `sessionDestroyed` method. Please see [1]. >> [1] http://www.myjavarecipes.com/tag/session-timeout-handling-in-java/ > In HttpSessionListener, it

Re: newFixedThreadPool in struts2

2018-02-10 Thread Yasser Zamani
On 2/9/2018 10:20 PM, Emi wrote: > [Try2] . Each user login session create one fixedPool . When user > logout, fixedPool.shutdown()   What about if users do not call > logout action. Where and how the fixedPool to be shutdown?   Is > there a way to auto shutdown after period of

Re: newFixedThreadPool in struts2

2018-02-09 Thread Yasser Zamani
On 2/8/2018 8:51 PM, Emi wrote: >> Firstly you should decide what do you like about life-time of that >> thread pool without being worry about calling shutdown. All your >> examples have solutions to call shutdown which I described below... >> Please read below >>> [Try1] . By springframe

Re: newFixedThreadPool in struts2

2018-02-08 Thread Yasser Zamani
Hello Emi, Firstly you should decide what do you like about life-time of that thread pool without being worry about calling shutdown. All your examples have solutions to call shutdown which I described below... Please read below On 2/8/2018 7:02 PM, Emi wrote: > Hello, > > Can you suggest

Fwd: Re: Struts 2.5.15

2018-02-01 Thread Yasser Zamani
2018-01-01 15:58 GMT+01:00 Lukasz Lenart : > Hi, > > First of all - Happy New Year :) > > Before we start working on Struts 2.6 I would like to release one more > 2.5.x version, there is few post 2.5.14 version issues that were > addressed in 2.5.15. If you have anything

Re: CDI Plugin example does not work in 2.5.14.1

2018-01-17 Thread Yasser Zamani
On 1/18/2018 12:26 AM, fullmit...@lycos.com wrote: > Caused By: java.lang.IllegalArgumentException > at com.bea.objectweb.asm.ClassReader.(Unknown Source) > at com.bea.objectweb.asm.ClassReader.(Unknown Source) > at > weblogic.application.utils.annotation.ClassInfoImpl.(ClassInfoImpl.java:92) >

Re: Multiple configuration files and incorrect global-results for different namespaces

2018-01-12 Thread Yasser Zamani
On 1/11/2018 11:13 AM, sim4...@gmail.com wrote: > My question is originally posted here: > https://stackoverflow.com/questions/48166761/struts-2-multiple-configuration-files-and-global-results-for-different-namespace > > But it is incorrectly marked as duplicate. Due to less formatting options,

Re: Unknown Error From JSON-Plugin

2018-01-07 Thread Yasser Zamani
On 1/3/2018 10:47 AM, sreekanth wrote: > I have a view page for displaying some already persisted data, this page most > of the time loads without any error (with the same set of data) and rarely > throws the exception which i have shared here. 75% time i've experienced > this exception when

Re: About error-code 404 is called for each struts action class

2018-01-05 Thread Yasser Zamani
On 1/6/2018 12:04 AM, Emi wrote: > 404.jsp is called by web.xml when going from one page to another. Maybe other requests like a missing favicon, css or javascript causes this. - To unsubscribe, e-mail:

Re: Unknown Error From JSON-Plugin

2018-01-02 Thread Yasser Zamani
On 1/3/2018 9:58 AM, Yasser Zamani wrote: > > > On 1/2/2018 10:31 PM, Yasser Zamani wrote: >> >> >> On 1/2/2018 9:26 PM, Yasser Zamani wrote: >>> Illegal field modifiers in class >>> org/apache/struts2/json/JSONWriter: 0xA >> >> I'

Re: Unknown Error From JSON-Plugin

2018-01-02 Thread Yasser Zamani
On 1/2/2018 10:31 PM, Yasser Zamani wrote: > > > On 1/2/2018 9:26 PM, Yasser Zamani wrote: >> Illegal field modifiers in class >> org/apache/struts2/json/JSONWriter: 0xA > > I'm confused :( 0xA means `JVM_ACC_PRIVATE | JVM_ACC_STATIC` but the > fields in an i

Re: Instancia the bean

2018-01-02 Thread Yasser Zamani
On 1/3/2018 1:08 AM, José Antonio Delgado Trujillo wrote: > If you have a form linked to a bean using key attribute, then when you > submitted, must you instantiate the bean before the call action populate the > properties? Or Strust2 instantiate automatically after you call the action. You

Re: Populate nested properties

2018-01-02 Thread Yasser Zamani
On 1/3/2018 1:30 AM, José Antonio Delgado Trujillo wrote: > Suppose that i have a nested Bean in a model class. > > > public Class Bean_B{ > private String text; > private int number; > ... > } > > public Class Bean_A{ > private Bean_B beanB; > ... > } > > A form > > > >

Re: exclude params submit

2018-01-02 Thread Yasser Zamani
On 1/2/2018 10:38 PM, José Antonio Delgado Trujillo wrote: > So produces the next error: > 18:27:10,990 ERROR [stderr] (default task-9) Unexpected Exception caught > setting 'submit' on 'class uoc.jdelgadot.loginstruts.action.Login: Error > setting expression 'submit' with value ['Acceder', ]

Re: Unknown Error From JSON-Plugin

2018-01-02 Thread Yasser Zamani
On 1/2/2018 9:26 PM, Yasser Zamani wrote: > Illegal field modifiers in class > org/apache/struts2/json/JSONWriter: 0xA I'm confused :( 0xA means `JVM_ACC_PRIVATE | JVM_ACC_STATIC` but the fields in an interface are implicitly public static final i.e. org/apache/struts

Re: Unknown Error From JSON-Plugin

2018-01-02 Thread Yasser Zamani
On 1/2/2018 8:36 PM, sreekanth wrote: > Caused by: java.lang.ClassFormatError: Failed to link > org/apache/struts2/json/DefaultJSONWriter (Module "deployment.my-app.ear" > from Service Module Loader): Failed to link > org/apache/struts2/json/JSONWriter (Module "deployment.my-app.ear" from >

Re: log4j problem

2017-12-30 Thread Yasser Zamani
On 12/30/2017 12:43 AM, José Antonio Delgado Trujillo wrote: > The log that is expected is ... Default level is `info` [1]. Please change them to `debug` because you expect debug level. [1] https://github.com/apache/struts-examples/blob/master/basic-struts/src/main/resources/log4j2.xml

Re: log4j problem

2017-12-29 Thread Yasser Zamani
Could you search for 'log4j' in your output. Log4j prints warning or error if cannot configure itself. Also see log4j jar should be in lib folder of your deployed web app. If presents and no log4j in your output, check Wildy log levels. On Dec 29, 2017, at 1:40PM, "José Antonio Delgado

Re: Action url

2017-12-28 Thread Yasser Zamani
On 12/28/2017 1:11 PM, Tamás Barta wrote: > Your suggestions are ok for processing requests but are not to write urls > (how to determine correct url) in jsps or other presentation layer output. > To handle both sides a more sophisticated solution is needed. As far as I can think, it seems you

Re: Action url

2017-12-28 Thread Yasser Zamani
On 12/28/2017 12:21 AM, Tamás Barta wrote: > For example there is a web application which has a LoginAction action. On > one site it is needed to access it via /login, on the other site /user/log. > > It is just an example. The urls shouldn't be hard-coded in action > annotations as I don't

Re: Action url

2017-12-27 Thread Yasser Zamani
On 12/28/2017 12:21 AM, Tamás Barta wrote: > For example there is a web application which has a LoginAction action. On > one site it is needed to access it via /login, on the other site /user/log. I'm just curious why you have to do such support. I think if I knew, I could have better advice.

Re: Action url

2017-12-27 Thread Yasser Zamani
On 12/27/2017 9:28 PM, Tamás Barta wrote: > I would like to use the same web app code > with different URLs (for different sites). Could you elaborate with an example, please?

Re: How to find location of an action

2017-12-27 Thread Yasser Zamani
On 12/27/2017 9:16 PM, Dave Weis wrote: > On Wed, Dec 27, 2017 at 11:43 AM, Yasser Zamani <yasserzam...@apache.org> > wrote: > >> On 12/27/2017 8:42 PM, Dave Weis wrote: >>> It would make things substantially >>> more convenient but I like the de

Re: How to find location of an action

2017-12-27 Thread Yasser Zamani
On 12/27/2017 8:42 PM, Dave Weis wrote: > It would make things substantially > more convenient but I like the declarative method so there's no question as > to intention. If I understood your high level English well ;) you are worry about if convention plugin ties your hand on results? No,

Re: How to find location of an action

2017-12-27 Thread Yasser Zamani
On 12/27/2017 7:52 PM, Dave Weis wrote: > I do have the struts-convention plugin loaded and removing it fixed my > problem!! > > Where was it trying to find the success forward? > > Thank you so much! Glad to hear this :) At [1] I saw it will look for `WEB-INF/content/logout.jsp` or

Re: How to find location of an action

2017-12-27 Thread Yasser Zamani
On 12/27/2017 7:01 PM, Dave Weis wrote: > Where it gets odd is that if I change that action definition to the > following and completely stop and start Tomcat from Eclipse I still get an > error: > > > /landing.jsp > > > /landing.jsp > > > Struts Problem Report > > Struts has detected an

Re: Recent examples

2017-12-25 Thread Yasser Zamani
On 12/25/2017 5:09 PM, albert kao wrote: > The Showcase App > https://github.com/apache/struts/tree/master/apps/showcase > do not allow "Clone or download". > > How to "Clone or download" it? You can clone or download [1] then change directory to `apps/showcase/` then run `mvn jetty:run`.

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: 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
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-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: 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 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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/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: 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: 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: 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: 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

<    1   2   3   >