well at the moment i'm just trying to get it to work from an html page that
submits to an action
so the html has the transaction=true and the action checks the token
i have been debugged the value of the session attribute
Globals.TRANSACTION_TOKEN_KEY at the start of the action the page submits
to..
the isValidToken fails beacuse the session token is null. the only way It
is not null is if I save the token in a previous action
what i want to know is how does this work for a single action? what if i
only hadf one action? (admittedly i wouldn't need the pattern then)
[EMAIL PROTECTED]
BC.ca To: [EMAIL PROTECTED]
cc:
24/03/04 14:01 Subject: RE: Sycnhronizer Token- can
someone explain this?Curre
Please respond to
struts-user
I'm not sure how it worked in 1.1, but what you're saying makes sense.
Basically there is a computeURL function that add the transaction attribute
only if it is set (in 1.1). This is for the html:link that I am talking
about:
// Add our transaction control token (if requested)
if (transaction) {
HttpSession session = pageContext.getSession();
String token = null;
if (session != null) {
token = (String)
session.getAttribute(Globals.TRANSACTION_TOKEN_KEY);
}
if (token != null) {
results.put(Constants.TOKEN_KEY, token);
}
}
So that is good I guess, but I don't know what you are trying to do
someaction -> saveToken -> jsp
jsp has transaction = true which means that it will propagate to the next
action that it submits to.
I may be missing something...
sandeep
-----Original Message-----
From: James Scrimshire [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 8:39 AM
To: [EMAIL PROTECTED]
Subject: RE: Sycnhronizer Token- can someone explain this?Curre
sandeep.
using transaction="true".. this is what i get from the action the link
submits too
as you can see the session token is null, and only gets set when i
explicitly call saveToken(request) from a prior action
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction:
****************************************************************
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Request
Token = null
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Session
Token = null
2004-03-24 13:36:34,073 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction:
****************************************************************
2004-03-24 13:36:34,089 [DEBUG]
gov.ons.classifications.controller.action.SynchronizerTokenAction: Invalid
Token
For the latest data on the economy and society
consult National Statistics at http://www.statistics.gov.uk
**********************************************************************
Please Note: Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**********************************************************************
Legal Disclaimer : Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**********************************************************************
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]