Re: Struts2 login action class seems to be reused

2018-03-15 Thread Prasanth Pasala
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 a user.

IP of the GET request of User1 matches with the login record in the database 
(login would be for User2 id and IP from User1 GET). So it looks as if the same 
user logged in from two different IPs
around the same time, which shouldn't be the case.

Thanks,
Prasanth

On 03/15/2018 10:28 AM, Yasser Zamani wrote:
>
> 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 both User1 and User2?
> Do you also have login time in there? If so, are they same and are they
> consistent with access log times? Are their IP same (while they
> shouldn't, right?)? Is the IP of the GET request of User1 (that is
> logged in access log by container) same as the IP field value of your
> login log records?
>
> Thanks!
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>



Struts - XWork validation - error message not taking parameters

2018-03-15 Thread Vikul Aggarwal
 Hi

I am using xwork validation to valid whether the value of an integer falls
in a valid range or not.

This is how the validator is configured:


0
9


 

int validator is com.opensymphony.xwork2.valida
tor.validators.IntRangeFieldValidator

The message import.validRange is present in the properties file and is as
follows:

import.validRange=${fieldName}: You must enter a value in the range ${min}
and ${max}.

However, when the validation runs the message that is printed is as follows:

You must enter a value in the range ognl.NoConversionPossible and
ognl.NoConversionPossible.

The values of parameters min and max are not getting passed to the message.

Any pointers would be helpful.

I am using struts 2.5.13.

The Doctypes are as follows:
http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd";>

Regards,
Vikul Aggarwal
+91 960 357 0807 <096035%2070807>


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 both User1 and User2?
Do you also have login time in there? If so, are they same and are they
consistent with access log times? Are their IP same (while they
shouldn't, right?)? Is the IP of the GET request of User1 (that is
logged in access log by container) same as the IP field value of your
login log records?

Thanks!


Re: Struts2 login action class seems to be reused

2018-03-15 Thread Prasanth Pasala
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.

Thanks,
Prasanth

On 03/15/2018 04:45 AM, Yasser Zamani wrote:
>
> 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 same IP for both of these users.
> As you get IP address from request (rather than Struts action), then it
> seems that request (which contains username/password and that same IP
> address) is being reused.
>
>> In the access log of the server there was a POST request for User1 but at 
>> the time of login entry for User2 there was only a
>> GET request.  In the time line GET request is first, User1 sees User2's 
>> information logs out and then login again with their credentials.
> At that time when there is a GET request for User1 and this issue
> happens, what are logs for User2 at same time?
>
> Thanks in advance!
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>



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 same IP for both of these users.

As you get IP address from request (rather than Struts action), then it
seems that request (which contains username/password and that same IP
address) is being reused.

> In the access log of the server there was a POST request for User1 but at the 
> time of login entry for User2 there was only a
> GET request.  In the time line GET request is first, User1 sees User2's 
> information logs out and then login again with their credentials.

At that time when there is a GET request for User1 and this issue
happens, what are logs for User2 at same time?

Thanks in advance!


Re: Issues while migrating form Struts2.3.16 to 2.5.14.1

2018-03-15 Thread Lukasz Lenart
maxLength was removed, use maxlength instead

2018-03-15 9:19 GMT+01:00 Rajvinder Pal :
> ok got it, working on it. Meanwhile there is one more  exception when
> accessing index.jsp.
>
>
> [3/15/18 13:32:12:669 IST] 0094 SystemOut O 15 Mar 2018
> 13:32:12,668 DEBUG cache:44 - Couldn't find template in cache for
> "org/apache/struts2/dispatcher/error.ftl"("en_US", UTF-8, parsed); will try
> to load it.
> [3/15/18 13:32:12:684 IST] 0094 SystemOut O 15 Mar 2018
> 13:32:12,684 DEBUG cache:44 -
> TemplateLoader.findTemplateSource("org/apache/struts2/dispatcher/error.ftl"):
> Found
> [3/15/18 13:32:12:687 IST] 0094 SystemOut O 15 Mar 2018
> 13:32:12,686 DEBUG cache:44 - Loading template for
> "org/apache/struts2/dispatcher/error.ftl"("en_US", UTF-8, parsed) from
> "wsjar:file:/WAS85/IBM/WebSphere/AppServer/profiles/myprofile/installedApps/myprofile-cell1/MyEAR.ear/MyWAR.war/WEB-INF/lib/struts2-core-2.5.14.1.jar!/org/apache/struts2/dispatcher/error.ftl"
> [3/15/18 13:32:12:955 IST] 0094 WASSessionCor W SessionAffinityManager
> setCookie SESN0066E: The response is already committed to the client. The
> session cookie cannot be set.
> [3/15/18 13:32:12:956 IST] 0094 SRTServletRes W
> com.ibm.ws.webcontainer.srt.SRTServletResponse addSessionCookie WARNING:
> Cannot set session cookie. Response already committed.
> [3/15/18 13:32:13:118 IST] 0095 ServletWrappe I
> com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [ MyEAR ]
> [/myapp] [/index.jsp]: Initialization successful.
> [3/15/18 13:32:15:116 IST] 0094 FfdcProvider  W
> com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident
> emitted on /WAS85/IBM/WebSphere/AppServer/profiles/ myprofile
> /logs/ffdc/myserver_530e808c_18.03.15_13.32.15.0127026367779684925623.txt
> com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.translateJsp 259
> [3/15/18 13:32:15:117 IST] 0094 webappE
> com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet
> Error]-[/jsp/userlogin/loginPage.jsp]: com.ibm.ws.jsp.JspCoreException:
> JSPG0218E: *Error failed to locate setter method for attribute maxLength in
> tag class org.apache.struts2.views.jsp.ui.TextFieldTag*
> at
> com.ibm.ws.jsp.taglib.TagClassInfo.getParameterClassName(TagClassInfo.java:191)
> at
> com.ibm.ws.jsp.translator.visitor.generator.BaseTagGenerator.evaluateAttribute(BaseTagGenerator.java:454)
> at
> com.ibm.ws.jsp.translator.visitor.generator.BaseTagGenerator.generateSetters(BaseTagGenerator.java:331)
> at
> com.ibm.ws.jsp.translator.visitor.generator.CustomTagGenerator.startGeneration(CustomTagGenerator.java:368)
> at
> com.ibm.ws.jsp.translator.visitor.generator.GenerateVisitor.startGeneration(GenerateVisitor.java:711)
> at
> com.ibm.ws.jsp.translator.visitor.generator.GenerateVisitor.visitCustomTagStart(GenerateVisitor.java:395)
> at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:366)
> at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:419)
> at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:369)
> at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:419)
> at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:234)
> at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:216)
> at
> com.ibm.ws.jsp.translator.visitor.generator.GenerateJspVisitor.visit(GenerateJspVisitor.java:143)
> at
> com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:127)
> at
> com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:254)
> at
> com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:121)
> at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:548)
> at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._checkForTranslation(AbstractJSPExtensionServletWrapper.java:465)
> at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkForTranslation(AbstractJSPExtensionServletWrapper.java:294)
> at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.findWrapper(AbstractJSPExtensionProcessor.java:498)
> at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.getServletWrapper(AbstractJSPExtensionProcessor.java:338)
> at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:965)
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1385)
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:194)
> at
> org.apache.struts2.result.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:169)
> at
> org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:204)
> at
> com.opensymphony.xwork2.DefaultActionIn

Re: Issues while migrating form Struts2.3.16 to 2.5.14.1

2018-03-15 Thread Rajvinder Pal
ok got it, working on it. Meanwhile there is one more  exception when
accessing index.jsp.


[3/15/18 13:32:12:669 IST] 0094 SystemOut O 15 Mar 2018
13:32:12,668 DEBUG cache:44 - Couldn't find template in cache for
"org/apache/struts2/dispatcher/error.ftl"("en_US", UTF-8, parsed); will try
to load it.
[3/15/18 13:32:12:684 IST] 0094 SystemOut O 15 Mar 2018
13:32:12,684 DEBUG cache:44 -
TemplateLoader.findTemplateSource("org/apache/struts2/dispatcher/error.ftl"):
Found
[3/15/18 13:32:12:687 IST] 0094 SystemOut O 15 Mar 2018
13:32:12,686 DEBUG cache:44 - Loading template for
"org/apache/struts2/dispatcher/error.ftl"("en_US", UTF-8, parsed) from
"wsjar:file:/WAS85/IBM/WebSphere/AppServer/profiles/myprofile/installedApps/myprofile-cell1/MyEAR.ear/MyWAR.war/WEB-INF/lib/struts2-core-2.5.14.1.jar!/org/apache/struts2/dispatcher/error.ftl"
[3/15/18 13:32:12:955 IST] 0094 WASSessionCor W SessionAffinityManager
setCookie SESN0066E: The response is already committed to the client. The
session cookie cannot be set.
[3/15/18 13:32:12:956 IST] 0094 SRTServletRes W
com.ibm.ws.webcontainer.srt.SRTServletResponse addSessionCookie WARNING:
Cannot set session cookie. Response already committed.
[3/15/18 13:32:13:118 IST] 0095 ServletWrappe I
com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [ MyEAR ]
[/myapp] [/index.jsp]: Initialization successful.
[3/15/18 13:32:15:116 IST] 0094 FfdcProvider  W
com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident
emitted on /WAS85/IBM/WebSphere/AppServer/profiles/ myprofile
/logs/ffdc/myserver_530e808c_18.03.15_13.32.15.0127026367779684925623.txt
com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.translateJsp 259
[3/15/18 13:32:15:117 IST] 0094 webappE
com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet
Error]-[/jsp/userlogin/loginPage.jsp]: com.ibm.ws.jsp.JspCoreException:
JSPG0218E: *Error failed to locate setter method for attribute maxLength in
tag class org.apache.struts2.views.jsp.ui.TextFieldTag*
at
com.ibm.ws.jsp.taglib.TagClassInfo.getParameterClassName(TagClassInfo.java:191)
at
com.ibm.ws.jsp.translator.visitor.generator.BaseTagGenerator.evaluateAttribute(BaseTagGenerator.java:454)
at
com.ibm.ws.jsp.translator.visitor.generator.BaseTagGenerator.generateSetters(BaseTagGenerator.java:331)
at
com.ibm.ws.jsp.translator.visitor.generator.CustomTagGenerator.startGeneration(CustomTagGenerator.java:368)
at
com.ibm.ws.jsp.translator.visitor.generator.GenerateVisitor.startGeneration(GenerateVisitor.java:711)
at
com.ibm.ws.jsp.translator.visitor.generator.GenerateVisitor.visitCustomTagStart(GenerateVisitor.java:395)
at
com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:366)
at
com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:419)
at
com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:369)
at
com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:419)
at
com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:234)
at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:216)
at
com.ibm.ws.jsp.translator.visitor.generator.GenerateJspVisitor.visit(GenerateJspVisitor.java:143)
at
com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:127)
at
com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:254)
at
com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:121)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:548)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._checkForTranslation(AbstractJSPExtensionServletWrapper.java:465)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkForTranslation(AbstractJSPExtensionServletWrapper.java:294)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.findWrapper(AbstractJSPExtensionProcessor.java:498)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.getServletWrapper(AbstractJSPExtensionProcessor.java:338)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:965)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1385)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:194)
at
org.apache.struts2.result.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:169)
at
org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:204)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:375)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:279)
at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:250)
at
com.