This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I've got an if statement in a bean that seems to be processing fine when I create a testjava class, but doesn't work fine when the bean is invoked by a jsp.
My code, let me shows you it:
First, the test class:
a snippit from the IrCollection class it calls:
There's more code in another method that calls this particular method using:
But the problem is that if (datum=="none") portion in the second code sample. Given that line 10 of the first class sets the member variable sort to "none", that processSort() method should set the member variable fullSort to " ORDER BY lastUpdated DESC"
And if I use the class in the first sample, it does that.
I have this custom tag:
Which the .jsp file invokes with this:
In other words, the exact same data is fed to the IrCollection bean. so I should get the same data, right?
Except I get this:
WHERE cotr = 'none' ORDER BY non DESC
so when Java calls it, it thinks "none" == "none"
but when jsp calls it, it thinks "none" != "none"