Re: Upgrading Struts 2.2.3 to 2.3.34

2017-11-03 Thread Ej Magdaluyo
Hi Lukasz, Yasser, Sorry for the late reply. Yes, the tiles jsp jar is on the classpath. After weeks of facing this issue, one of my colleagues was able to solve the issue. We imported the following in the java file: import org.apache.struts2.dispatcher.*; and added the following in the viewMy

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-11-03 Thread Lukasz Lenart
Do you have the Tiles JSP jar on the classpath? https://tiles.apache.org/framework/tiles-jsp/index.html Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2017-10-30 16:36 GMT+01:00 Ej Magdaluyo : > Hi Lukasz, > > Unfortunately, the coding conventions in our application are not up to

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-30 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 li

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-30 Thread Ej Magdaluyo
Hi Lukasz, Unfortunately, the coding conventions in our application are not up to today's standards. We were given this old application to work on hence some of the conventions (such as scriplets) are not ideal. This is the supposed flow: struts.xml: /jsp/viewMyRequest.jsp method viewMyRequ

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-27 Thread Lukasz Lenart
2017-10-27 14:34 GMT+02:00 Ej Magdaluyo : > This is the java code: > public String viewMyRequest() throws Exception { > SearchCriteriaVO searchCriteriaVO= constructSearchCriteria(); > MyRequestDelegate myRequestDelegate = new MyRequestDelegate(); > ViewReqDetails = myRequestDelegate.getRequestViewD

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-27 Thread Ej Magdaluyo
Hi Lukasz, The code once being called in the JSP seems to return a null value. This is the java code: public String viewMyRequest() throws Exception { SearchCriteriaVO searchCriteriaVO= constructSearchCriteria(); MyRequestDelegate myRequestDelegate = new MyRequestDelegate(); ViewReqDetails = myRe

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-27 Thread Lukasz Lenart
I think this is your problem: ViewReqDetailsVO ViewReqDetails = (ViewReqDetailsVO)request.getAttribute("ViewReqDetails"); that the "ViewReqDetails" request attribute is null. You can check by putting System.out.println(ViewReqDetailsVO) next to the above What logic/code do you use to put that at

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-27 Thread Ej Magdaluyo
Hi Yasser, Unfortunately, moving the raw java codes into the action is not an option. We have tried running the java files itself and there are no issues with the output, which leads me to believe that there might by an issue with struts in our jsp and its interaction with the scriplets we are usi

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. > getReqLineAttribut

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-26 Thread Ej Magdaluyo
Hi Lukasz, Yasser, 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. getReqLineAttributesUIList(); java.util.List reqLineAt

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-25 Thread Lukasz Lenart
2017-10-25 18:50 GMT+02:00 Ej Magdaluyo : > We did not change anything with regards to the java files, so we are unsure > why it is returning a 403 forbidden. Would you have any ideas? I would move this code into an action, probably it produces an exception. Regards -- Łukasz + 48 606 323 122 h

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] https://stackoverflow.com/questio

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-25 Thread Ej Magdaluyo
HI Yasser, Upon doing investigation, it seems that the permission issue may be appearing once we create objects and call java files: <% ViewReqDetailsVO ViewReqDetails = (ViewReqDetailsVO)request.getAttribute("ViewReqDetails"); java.util.List classficationList = ViewReqDetails.getClassficationLis

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-25 Thread Ej Magdaluyo
Hi Yasser, Upon doing your suggestion, the simple string appeared without any issues. Thanks. On Wed, Oct 25, 2017 at 10:14 PM, Yasser Zamani wrote: > > > On 10/25/2017 5:32 PM, Ej Magdaluyo wrote: > > This is a really difficult issue to troubleshoot:( > > I love difficult issues ;) could you

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 Ej Magdaluyo
Hi Yasser, Unfortunately, we already have debug enabled, and there is no error log pointing to why 403 is thrown. Everything in the logs is normal up until the 403 Forbidden error. This is a really difficult issue to troubleshoot :( Thanks. On Wed, Oct 25, 2017 at 5:50 PM, Yasser Zamani wrote:

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-25 Thread Ej Magdaluyo
Hi Yasser, We have tried the method you have suggested. However, it still returns a 403 error with the new jsp file. We have also tried relocating the jsp and calling it elsewhere, but it is still not working. We are currently out of ideas on how to proceed. Do you think it may have something to

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 page

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-24 Thread Ej Magdaluyo
Hi Yasser, We tried the ff: Mapped other direct jsp result to viewAction -> successful Mapped other action which has direct jsp result to viewMyRequest.jsp -> error 403 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 thi

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 issue

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-24 Thread Ej Magdaluyo
HI Yasser, 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 issues. It seems to only be denying permission p

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 Ej Magdaluyo
Hi Yasser, Thank you for this. It seems that through your suggestion, the 403 error is gone. We just got a bit confused since our pre-migration app worked even though type="tiles" was not included. The only problem now seems that the page is only partially loaded, and the data is not being retrie

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-13 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 40

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-13 Thread Ej Magdaluyo
Hi Lukasz, Can you please clarify what you mean by request url? I am thinking that it might by either a Struts or a Tiles issue since I tried replicating the issue on the pre-migrated version and found no issues. I did extensive check on the logs from our end: Writing headers for HttpRequest@172

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-13 Thread Lukasz Lenart
2017-10-13 11:17 GMT+02:00 Ej Magdaluyo : > Upon checking our application, most of the functionalities seem to be > working now, except for one page which throws an Error403-- Forbidden > error. We are not able to retrieve any logs in relation to this: > > Error 403--Forbidden > From RFC 2068 *Hype

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-13 Thread Ej Magdaluyo
Hi Yasser, Lukasz, This is to confirm that the issue with fileSizeError was fixed through Yasser's suggestion :) Upon checking our application, most of the functionalities seem to be working now, except for one page which throws an Error403-- Forbidden error. We are not able to retrieve any logs

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: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Lukasz Lenart
2017-10-12 19:06 GMT+02:00 Yasser Zamani : > On 10/12/2017 4:03 PM, Ej Magdaluyo wrote: >> *if*(fileRequestWrapper!=*null* &&fileRequestWrapper >> .getErrors()!=*null*){ > > I worked and found the bug :) the new version of MultiPartRequestWrapper > instantiates it's `error` inside

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* &&fileRequestWrapper > .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 Ej Magdaluyo
Upon investigating the interceptor flow, it should be working based on my understanding: RequestInterceptor: *import* org.apache.struts2.ServletActionContext; *import* org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper; *import* com.opensymphony.xwork2.ActionInvocation; *impor

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Ej Magdaluyo
Hi Yasser, Lukasz, Thank you for the information. I will look into the code and will let you know. Here is the list of the JAR files: antlr-2.7.2.jar asm-3.3.jar asm-commons-3.3.jar asm-tree-3.3.jar commons-beanutils-1.8.0.jar commons-collections-3.2.2.jar commons-digester-2.0.jar commons-fileupl

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Lukasz Lenart
2017-10-12 10:14 GMT+02:00 Ej Magdaluyo : > 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 certain which v

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 ce

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Ej Magdaluyo
HI Lukasz, Yasser, 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 certain which version changed this. We

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Lukasz Lenart
2017-10-12 9:44 GMT+02:00 Ej Magdaluyo : > Hi Lukasz, > > Here it is: > > > /addAccess As Yasser already pointed out, you are missing a "fileSizeError" result, probably one of the interceptors returns it. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ ---

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 > > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultA

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Ej Magdaluyo
Hi Lukasz, Here it is: /addAccess tiles.xml: This functionality was working correctly prior to the upgrade. I am not exactly sure what triggered the exception this time. I have already tried removing the / for this and the error persists. Your help would be greatly appreciated. Thanks

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Lukasz Lenart
2017-10-12 3:55 GMT+02:00 Ej Magdaluyo : > No result defined for action com.MyRequestAction and result fileSizeError Can you post your action & result definition from struts.xml? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ --

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-12 Thread Ej Magdaluyo
Hi Yasser, Here is the stacktrace: No result defined for action com.MyRequestAction and result fileSizeError - action com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:374) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.ja

Re: Upgrading Struts 2.2.3 to 2.3.34

2017-10-11 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: user-unsubscr...@struts.apache.or