Saturday, February 20, 2010

DisplayTag and saveToken/isValidToken Struts

Like Alcohol and Driving... "Never mix them" when you're working with reports and you have enabled export feature.
Because org.apache.struts.taglib.html.TOKEN is being pased as parameter to the export link generated in your report.
It works only if you're displaying only one report, but if you have multiple reports displayed based on the first one, just apply this technique foR preventing doble submission on the first method of your DispatchAction, on the next one and so on, don't do it.

Now my report my screen is displayed, and I submit my form to the next method on my dispatchAction


The next method to be invoked shouldn't implement Tokens