Request parameter value different from instance variable value

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Request parameter value different from instance variable value

Prasanth-2
Hi,

I am using struts 2.3.34 and have an form with few text fields and a hidden field. All the values are set correctly in the action class except for the hidden field value.

Below is the html code in the form
<input type="hidden" name="page" value="ChangePassword" id="ChangePassword_page"/>

In the action the value set to page variable is "ChangePassword, ChangePassword". When I get the value from request object (request.getParameter("page");) it returns "ChangePassword".

Any idea why my action instance variable is set with a different value than what is in the request parameter?

Below is the stack trace from the setPage function.

 (java.lang.StackTraceElement[]) [java.lang.Thread.getStackTrace(Thread.java:1559)
 com.xxxxxx.webaccess.ContactInfoAction.setPage(ContactInfoAction.java:162)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 java.lang.reflect.Method.invoke(Method.java:498)
 ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:897)
 ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1299)
 ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1508)
 ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85)
 ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162)
 com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:27)
 ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2437)
 com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:81)
 ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2437)
 ognl.ASTProperty.setValueBody(ASTProperty.java:127)
 ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
 ognl.SimpleNode.setValue(SimpleNode.java:301)
 ognl.Ognl.setValue(Ognl.java:713)
 com.opensymphony.xwork2.ognl.OgnlUtil$1.execute(OgnlUtil.java:306)
 com.opensymphony.xwork2.ognl.OgnlUtil$1.execute(OgnlUtil.java:298)
 com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecute(OgnlUtil.java:393)
 com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:298)
 com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:184)
 com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:171)
 com.opensymphony.xwork2.ognl.OgnlValueStack.setParameter(OgnlValueStack.java:153)
 com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:303)
 com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:221)
 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:140)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
 org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
 org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)
 org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
 io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
 com.xxxxx.webaccess.LoginFilter.doFilter(LoginFilter.java:66)
 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
 io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
 io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
 io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
 io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
 io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274)
 io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:209)
 io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:221)
 io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:147)
 io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:111)
 com.xxxxx.webaccess.PasswordChangedFilter.doFilter(PasswordChangedFilter.java:66)
 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
 io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
 com.xxxxxx.webaccess.LoginFilter.doFilter(LoginFilter.java:66)
 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
 io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
 io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
 io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
 io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
 org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
 io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
 io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
 io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
 io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
 io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
 io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
 io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
 io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
 io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
 io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
 io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
 io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
 io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
 io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
 io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
 io.undertow.servlet.handlers.ServletInitialHandl...

Thanks,
Prasanth
Reply | Threaded
Open this post in threaded view
|

Re: Request parameter value different from instance variable value

Prasanth Pasala
This seems to be happening only when the PasswordChangedFilter forwards the request to this action. If the action is accessed directly it works fine.

Thanks,
Prasanth

On 05/07/2018 11:05 AM, Prasanth wrote:

> Hi,
>
> I am using struts 2.3.34 and have an form with few text fields and a hidden field. All the values are set correctly in the action class except for the hidden field value.
>
> Below is the html code in the form
> <input type="hidden" name="page" value="ChangePassword" id="ChangePassword_page"/>
>
> In the action the value set to page variable is "ChangePassword, ChangePassword". When I get the value from request object (request.getParameter("page");) it returns "ChangePassword".
>
> Any idea why my action instance variable is set with a different value than what is in the request parameter?
>
> Below is the stack trace from the setPage function.
>
>  (java.lang.StackTraceElement[]) [java.lang.Thread.getStackTrace(Thread.java:1559)
>  com.xxxxxx.webaccess.ContactInfoAction.setPage(ContactInfoAction.java:162)
>  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  java.lang.reflect.Method.invoke(Method.java:498)
>  ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:897)
>  ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1299)
>  ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1508)
>  ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85)
>  ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162)
>  com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:27)
>  ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2437)
>  com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:81)
>  ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2437)
>  ognl.ASTProperty.setValueBody(ASTProperty.java:127)
>  ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
>  ognl.SimpleNode.setValue(SimpleNode.java:301)
>  ognl.Ognl.setValue(Ognl.java:713)
>  com.opensymphony.xwork2.ognl.OgnlUtil$1.execute(OgnlUtil.java:306)
>  com.opensymphony.xwork2.ognl.OgnlUtil$1.execute(OgnlUtil.java:298)
>  com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecute(OgnlUtil.java:393)
>  com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:298)
>  com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:184)
>  com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:171)
>  com.opensymphony.xwork2.ognl.OgnlValueStack.setParameter(OgnlValueStack.java:153)
>  com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:303)
>  com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:221)
>  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
>  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
>  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:140)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
>  org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
>  org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)
>  org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
>  org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
>  io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
>  io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
>  com.xxxxx.webaccess.LoginFilter.doFilter(LoginFilter.java:66)
>  io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
>  io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
>  io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
>  io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
>  io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
>  io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>  io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>  io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>  io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274)
>  io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:209)
>  io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:221)
>  io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:147)
>  io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:111)
>  com.xxxxx.webaccess.PasswordChangedFilter.doFilter(PasswordChangedFilter.java:66)
>  io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
>  io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
>  com.xxxxxx.webaccess.LoginFilter.doFilter(LoginFilter.java:66)
>  io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
>  io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
>  io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
>  io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
>  io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
>  org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
>  io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>  io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
>  io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
>  io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>  io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
>  io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
>  io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
>  io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
>  io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
>  io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
>  io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
>  io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
>  io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>  org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
>  io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>  org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
>  io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>  io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
>  io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
>  io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
>  io.undertow.servlet.handlers.ServletInitialHandl...
>
> Thanks,
> Prasanth
>

Reply | Threaded
Open this post in threaded view
|

Re: Request parameter value different from instance variable value

Yasser Zamani
In reply to this post by Prasanth-2


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.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Request parameter value different from instance variable value

Prasanth Pasala
I think I might have found the reason. The page it is forwarded to have page=ChangePassword as a query string. So I think struts is getting data from the query string and the post data and combining
them to form the ChangePassword, ChangePassword as the value for the page variable.

I have fixed the logic in ChangePasswordFilter to not forward if the request is going to ChangePassword action.

Thanks,
Prasanth

On 05/08/2018 01:39 AM, Yasser Zamani wrote:

>
> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>