top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Struts2 token problem

+2 votes
284 views

I am facing an issue related to maintaining session token value when we have window forms.

We have a main form, which needs token to submit. There is a link through which we can open a window , which also needs token and can submit the form.

Once we close the window and try to submit the main form, we get token mismatch error. Because the session token had changed by this time.

Is there any solution for this issue.

posted Aug 18, 2014 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

I am using struts 2.3.15 libraries. I have put a text field value as "user ".

Whenever I submit the form, the text field value changes and the special character changes to "?".

I have struts1 also in the same project and it works perfectly fine for struts1 pages.

+1 vote

I am using the token session interceptor for a form and I have this situation:
1) I am in the form page;
2) I leave the form page;
3) Go back to the form page by the "back" button;
4) Submit the form;

And of course the form is not submitted and the token returns "invalid.token" but do not adds no actionError. It will not be interesting to add an action error?

Ok, I can resend to a page with a message but I already have a error page that presents the action errors when necessary.

+1 vote

I am creating an ajax call for a method which is protected by the TokenSessionStoreInterceptor. This means I need to pass the token onto the request.

I was expecting the s:token tag to accept data-foo="bar" attributes (they'd be passed along to the corresponding hidden elements), but this is not happening (I'd use this so I could retrieve the inputs with a
simple jquery select .find(":input[data-scope='save'], which retrieves me all the needed inputs as long as I mark them with that data-scope ).

My 2nd attempt was also unsuccessful - while doesn't break rendering, the class is not passed onto the hidden input elements.

Is there a reason for this? While in the case of data-foo this seems to be a missing feature, in the case of cssClass it's also misleading - you can set the property, but it doesn't have any consequence.

+1 vote

Will it restrict the information being stored at the browser cache.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...