transactional token
Hi, I find that I would like to include transactional tokens from my jsp page - I see that there is a transaction=true on the html:link tag but not on the html:form tag. I am planning to add this on the html:form tag as well. I just wanted to check with people on this list if there was a reason/problem why this wasnt done in the implementation of struts itself. Also is it considered a bad practise to saveTokens from the JSP pages at request time rather than in an action? Thanks Pratima -Original Message- From: Gogineni, Pratima Sent: Tuesday, July 10, 2001 9:33 PM To: '[EMAIL PROTECTED]' Subject: would transactional token help in this case? (could be a threadin g issue?) Hi, I have an application in which I havent used transactional tokens. I have a text field where I defined a onchange=preprocess() which sets a value and then submits the form. Heres the behaviour I see: a. It works 'perfectly' when I change the value and move the focus out of this text box (it gets submitted). b. It works 'alright' (for some reason this takes longer to process than the above case) when I hit enter in the text field c. It sometimes throws an error when I do step (a) followed by step (b) without waiting for the control to return from step (a). The kind of error I am getting (I would have to explain my program in detail to exactly say what this error is) leads me to suspect that two threads are trying to access/change the data in the form bean. Has anyone seen this behaviour before or knows if using transactional tokens would help in this case? (I am suspecting not from what I know of the way they work ...) Also note that this form/application worked well when I did not use onclick - i.e. using the default behaviour of submitting the value of the text field when you hit enter ... Thanks Pratima -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 7:49 AM To: [EMAIL PROTECTED] Subject: Error-page in web.xml I'm hoping someone can help me understand this better. In web.xml, I have the following entries - error-page exception-typejava.lang.Exception/exception-type location/errorpage.jsp/location /error-page error-page exception-typejavax.servlet.ServletException/exception-type location/errorpagesrvlt.jsp/location /error-page From my understanding, anytime an Exception, or ServletException occurs in my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is that correct? Does it matter if the exception occurs in a JSP or a servlet? This seems to work in Tomcat, but with SilverStream, I don't get taken to the error page, but get the SilverStream generate error message. In my errorpage.jsp I have - %@ page language=Java isErrorPage=true% is that right? Thanks for any insite, this is driving me crazy. Ryan
RE: transactional token
clearly - I dotn understand the transaction tokens very well ... I just looked at the html:form tag and it seems they are adding the token in there if one is present in the session? Why is this behaviour as opposed to what is done in the html:link tag? so to use a transactional token with a form I have to set one in the session? thanks Pratima -Original Message- From: Gogineni, Pratima Sent: Wednesday, July 11, 2001 10:22 AM To: '[EMAIL PROTECTED]' Subject: transactional token Hi, I find that I would like to include transactional tokens from my jsp page - I see that there is a transaction=true on the html:link tag but not on the html:form tag. I am planning to add this on the html:form tag as well. I just wanted to check with people on this list if there was a reason/problem why this wasnt done in the implementation of struts itself. Also is it considered a bad practise to saveTokens from the JSP pages at request time rather than in an action? Thanks Pratima -Original Message- From: Gogineni, Pratima Sent: Tuesday, July 10, 2001 9:33 PM To: '[EMAIL PROTECTED]' Subject: would transactional token help in this case? (could be a threadin g issue?) Hi, I have an application in which I havent used transactional tokens. I have a text field where I defined a onchange=preprocess() which sets a value and then submits the form. Heres the behaviour I see: a. It works 'perfectly' when I change the value and move the focus out of this text box (it gets submitted). b. It works 'alright' (for some reason this takes longer to process than the above case) when I hit enter in the text field c. It sometimes throws an error when I do step (a) followed by step (b) without waiting for the control to return from step (a). The kind of error I am getting (I would have to explain my program in detail to exactly say what this error is) leads me to suspect that two threads are trying to access/change the data in the form bean. Has anyone seen this behaviour before or knows if using transactional tokens would help in this case? (I am suspecting not from what I know of the way they work ...) Also note that this form/application worked well when I did not use onclick - i.e. using the default behaviour of submitting the value of the text field when you hit enter ... Thanks Pratima -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 7:49 AM To: [EMAIL PROTECTED] Subject: Error-page in web.xml I'm hoping someone can help me understand this better. In web.xml, I have the following entries - error-page exception-typejava.lang.Exception/exception-type location/errorpage.jsp/location /error-page error-page exception-typejavax.servlet.ServletException/exception-type location/errorpagesrvlt.jsp/location /error-page From my understanding, anytime an Exception, or ServletException occurs in my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is that correct? Does it matter if the exception occurs in a JSP or a servlet? This seems to work in Tomcat, but with SilverStream, I don't get taken to the error page, but get the SilverStream generate error message. In my errorpage.jsp I have - %@ page language=Java isErrorPage=true% is that right? Thanks for any insite, this is driving me crazy. Ryan
RE: transactional token
I looked at the saveToken() in the action class -its just saving it in the session. So I guess that makes sense. Sorry for dashing off the previous mail without completely looking at the code. Thansk Pratima -Original Message- From: Gogineni, Pratima Sent: Wednesday, July 11, 2001 10:30 AM To: Gogineni, Pratima; '[EMAIL PROTECTED]' Subject: RE: transactional token clearly - I dotn understand the transaction tokens very well ... I just looked at the html:form tag and it seems they are adding the token in there if one is present in the session? Why is this behaviour as opposed to what is done in the html:link tag? so to use a transactional token with a form I have to set one in the session? thanks Pratima -Original Message- From: Gogineni, Pratima Sent: Wednesday, July 11, 2001 10:22 AM To: '[EMAIL PROTECTED]' Subject: transactional token Hi, I find that I would like to include transactional tokens from my jsp page - I see that there is a transaction=true on the html:link tag but not on the html:form tag. I am planning to add this on the html:form tag as well. I just wanted to check with people on this list if there was a reason/problem why this wasnt done in the implementation of struts itself. Also is it considered a bad practise to saveTokens from the JSP pages at request time rather than in an action? Thanks Pratima -Original Message- From: Gogineni, Pratima Sent: Tuesday, July 10, 2001 9:33 PM To: '[EMAIL PROTECTED]' Subject: would transactional token help in this case? (could be a threadin g issue?) Hi, I have an application in which I havent used transactional tokens. I have a text field where I defined a onchange=preprocess() which sets a value and then submits the form. Heres the behaviour I see: a. It works 'perfectly' when I change the value and move the focus out of this text box (it gets submitted). b. It works 'alright' (for some reason this takes longer to process than the above case) when I hit enter in the text field c. It sometimes throws an error when I do step (a) followed by step (b) without waiting for the control to return from step (a). The kind of error I am getting (I would have to explain my program in detail to exactly say what this error is) leads me to suspect that two threads are trying to access/change the data in the form bean. Has anyone seen this behaviour before or knows if using transactional tokens would help in this case? (I am suspecting not from what I know of the way they work ...) Also note that this form/application worked well when I did not use onclick - i.e. using the default behaviour of submitting the value of the text field when you hit enter ... Thanks Pratima -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 7:49 AM To: [EMAIL PROTECTED] Subject: Error-page in web.xml I'm hoping someone can help me understand this better. In web.xml, I have the following entries - error-page exception-typejava.lang.Exception/exception-type location/errorpage.jsp/location /error-page error-page exception-typejavax.servlet.ServletException/exception-type location/errorpagesrvlt.jsp/location /error-page From my understanding, anytime an Exception, or ServletException occurs in my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is that correct? Does it matter if the exception occurs in a JSP or a servlet? This seems to work in Tomcat, but with SilverStream, I don't get taken to the error page, but get the SilverStream generate error message. In my errorpage.jsp I have - %@ page language=Java isErrorPage=true% is that right? Thanks for any insite, this is driving me crazy. Ryan
RE: transactional token
does anyone know where to find out how to use transactional token in struts? Thanks, -Original Message- From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:30 AM To: Gogineni, Pratima; '[EMAIL PROTECTED]' Subject: RE: transactional token clearly - I dotn understand the transaction tokens very well ... I just looked at the html:form tag and it seems they are adding the token in there if one is present in the session? Why is this behaviour as opposed to what is done in the html:link tag? so to use a transactional token with a form I have to set one in the session? thanks Pratima -Original Message- From: Gogineni, Pratima Sent: Wednesday, July 11, 2001 10:22 AM To: '[EMAIL PROTECTED]' Subject: transactional token Hi, I find that I would like to include transactional tokens from my jsp page - I see that there is a transaction=true on the html:link tag but not on the html:form tag. I am planning to add this on the html:form tag as well. I just wanted to check with people on this list if there was a reason/problem why this wasnt done in the implementation of struts itself. Also is it considered a bad practise to saveTokens from the JSP pages at request time rather than in an action? Thanks Pratima -Original Message- From: Gogineni, Pratima Sent: Tuesday, July 10, 2001 9:33 PM To: '[EMAIL PROTECTED]' Subject: would transactional token help in this case? (could be a threadin g issue?) Hi, I have an application in which I havent used transactional tokens. I have a text field where I defined a onchange=preprocess() which sets a value and then submits the form. Heres the behaviour I see: a. It works 'perfectly' when I change the value and move the focus out of this text box (it gets submitted). b. It works 'alright' (for some reason this takes longer to process than the above case) when I hit enter in the text field c. It sometimes throws an error when I do step (a) followed by step (b) without waiting for the control to return from step (a). The kind of error I am getting (I would have to explain my program in detail to exactly say what this error is) leads me to suspect that two threads are trying to access/change the data in the form bean. Has anyone seen this behaviour before or knows if using transactional tokens would help in this case? (I am suspecting not from what I know of the way they work ...) Also note that this form/application worked well when I did not use onclick - i.e. using the default behaviour of submitting the value of the text field when you hit enter ... Thanks Pratima -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 7:49 AM To: [EMAIL PROTECTED] Subject: Error-page in web.xml I'm hoping someone can help me understand this better. In web.xml, I have the following entries - error-page exception-typejava.lang.Exception/exception-type location/errorpage.jsp/location /error-page error-page exception-typejavax.servlet.ServletException/exception-type location/errorpagesrvlt.jsp/location /error-page From my understanding, anytime an Exception, or ServletException occurs in my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is that correct? Does it matter if the exception occurs in a JSP or a servlet? This seems to work in Tomcat, but with SilverStream, I don't get taken to the error page, but get the SilverStream generate error message. In my errorpage.jsp I have - %@ page language=Java isErrorPage=true% is that right? Thanks for any insite, this is driving me crazy. Ryan
RE: transactional token
I just figured it today. I looked for the documentation too but couldnt find any. Looking at the following methods helped me understand it. a. saveToken(), resetToken(), isTokenValid() methods in Action class b. computeURL ( computeParameters) mehtod in requestUtil shows how it is added into the url of a link c. look at the FormTag.java and LinkTag.java to see how the transactional token is added Hope this helps Pratima -Original Message- From: Trieu, Danny [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 1:40 PM To: '[EMAIL PROTECTED]' Subject: RE: transactional token does anyone know where to find out how to use transactional token in struts? Thanks, -Original Message- From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:30 AM To: Gogineni, Pratima; '[EMAIL PROTECTED]' Subject: RE: transactional token clearly - I dotn understand the transaction tokens very well ... I just looked at the html:form tag and it seems they are adding the token in there if one is present in the session? Why is this behaviour as opposed to what is done in the html:link tag? so to use a transactional token with a form I have to set one in the session? thanks Pratima -Original Message- From: Gogineni, Pratima Sent: Wednesday, July 11, 2001 10:22 AM To: '[EMAIL PROTECTED]' Subject: transactional token Hi, I find that I would like to include transactional tokens from my jsp page - I see that there is a transaction=true on the html:link tag but not on the html:form tag. I am planning to add this on the html:form tag as well. I just wanted to check with people on this list if there was a reason/problem why this wasnt done in the implementation of struts itself. Also is it considered a bad practise to saveTokens from the JSP pages at request time rather than in an action? Thanks Pratima -Original Message- From: Gogineni, Pratima Sent: Tuesday, July 10, 2001 9:33 PM To: '[EMAIL PROTECTED]' Subject: would transactional token help in this case? (could be a threadin g issue?) Hi, I have an application in which I havent used transactional tokens. I have a text field where I defined a onchange=preprocess() which sets a value and then submits the form. Heres the behaviour I see: a. It works 'perfectly' when I change the value and move the focus out of this text box (it gets submitted). b. It works 'alright' (for some reason this takes longer to process than the above case) when I hit enter in the text field c. It sometimes throws an error when I do step (a) followed by step (b) without waiting for the control to return from step (a). The kind of error I am getting (I would have to explain my program in detail to exactly say what this error is) leads me to suspect that two threads are trying to access/change the data in the form bean. Has anyone seen this behaviour before or knows if using transactional tokens would help in this case? (I am suspecting not from what I know of the way they work ...) Also note that this form/application worked well when I did not use onclick - i.e. using the default behaviour of submitting the value of the text field when you hit enter ... Thanks Pratima -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 7:49 AM To: [EMAIL PROTECTED] Subject: Error-page in web.xml I'm hoping someone can help me understand this better. In web.xml, I have the following entries - error-page exception-typejava.lang.Exception/exception-type location/errorpage.jsp/location /error-page error-page exception-typejavax.servlet.ServletException/exception-type location/errorpagesrvlt.jsp/location /error-page From my understanding, anytime an Exception, or ServletException occurs in my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is that correct? Does it matter if the exception occurs in a JSP or a servlet? This seems to work in Tomcat, but with SilverStream, I don't get taken to the error page, but get the SilverStream generate error message. In my errorpage.jsp I have - %@ page language=Java isErrorPage=true% is that right? Thanks for any insite, this is driving me crazy. Ryan
would transactional token help in this case? (could be a threading issue?)
Hi, I have an application in which I havent used transactional tokens. I have a text field where I defined a onchange=preprocess() which sets a value and then submits the form. Heres the behaviour I see: a. It works 'perfectly' when I change the value and move the focus out of this text box (it gets submitted). b. It works 'alright' (for some reason this takes longer to process than the above case) when I hit enter in the text field c. It sometimes throws an error when I do step (a) followed by step (b) without waiting for the control to return from step (a). The kind of error I am getting (I would have to explain my program in detail to exactly say what this error is) leads me to suspect that two threads are trying to access/change the data in the form bean. Has anyone seen this behaviour before or knows if using transactional tokens would help in this case? (I am suspecting not from what I know of the way they work ...) Also note that this form/application worked well when I did not use onclick - i.e. using the default behaviour of submitting the value of the text field when you hit enter ... Thanks Pratima -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 7:49 AM To: [EMAIL PROTECTED] Subject: Error-page in web.xml I'm hoping someone can help me understand this better. In web.xml, I have the following entries - error-page exception-typejava.lang.Exception/exception-type location/errorpage.jsp/location /error-page error-page exception-typejavax.servlet.ServletException/exception-type location/errorpagesrvlt.jsp/location /error-page From my understanding, anytime an Exception, or ServletException occurs in my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is that correct? Does it matter if the exception occurs in a JSP or a servlet? This seems to work in Tomcat, but with SilverStream, I don't get taken to the error page, but get the SilverStream generate error message. In my errorpage.jsp I have - %@ page language=Java isErrorPage=true% is that right? Thanks for any insite, this is driving me crazy. Ryan