use c:choose instead of c:if to prevent duplication of the test

In the current code, two complementary tests are specified. This is equivalent to 
`if(test) {...} else if (not test) {...}`
This change refactors this to 
`if(test) {...} else {...}`