More on J2EE testing. Something we are figuring out on our current project. I’ll read up on it tomorrow.
Author: anderssv
Struts and Synchronizer Token
Alright, many might already know this, but it’s new to me so here goes.
I thought I had used most of the features of Struts, but I still find new features. Feature of the day: Synchronizer Token.
For those of you unfamiliar with the Synchronizer Token pattern, it ensures data can only be submitted once from a webform.
Call ActionServlet.saveToken(HttpRequest)
before the display of the form to set the token, and then check ActionServlet.isTokenValid(HttpRequest)
upon submit. If the token is valid you reset it with ActionServlet.resetToken(HttpRequest)
, which makes sure the next call to isTokenValid will fail.
I wish it was possible to set several tokens though. If a user opens more than one browser window and ends up having two forms that use the tokens open, the last form will overwrite the first forms token and thus make it fail when submitted. I know it’s a marginal case, and not one that is likely to happen very often, but I don’t think it would be a big problem to implement.
Siemens Mobile Phones
This is just too insane. Don’t they ever carry out any user-tests on these phones? Apparently the Siemens phones plays a shutdown tune when it turns off. Always. Period. This means that if you are in a call and the phone shuts off because of an empty battery you hearing might get damaged because of the loud volume of the shutdown tune. It’s just incredible this plain and common use case hasn’t been tested.
I’ve owned one Siemens phone in my life, and they have a lot to prove for me to even consider buying a Siemens phone. I bought a Siemens S40 when they were completely new. It was excellent, at least on the paper. The correct features, and an excellent design. I fell in love at first sight. That’s before I found the bugs. It had a serious flaw in the core of its filesystem. This caused messages to be received but not visible on the phone (available in the sim when inserted to other phones), and menuitems disapperaring. It is the worst phone I’ve ever owned.
Some of my friends have the S55, which looked like an excellent phone when it arrived, but turned out to have all the quirks and annoyances of regular Siemens phones. Sucky phone.
When I go shopping for phones today I don’t even look at the Siemens specs. They have a lot to prove before I ever will.