In my JSP web application, I want to redirect sample users to a different page from the real users.Currently we do something likeif((user.getName().equalsIgnoreCase(Sample)) ...This is (a) hardcoded and (b) executed for each normal user as well.Is there a better way to handle this logic?I am loathe to redirect these users via Javascript validation - which is one of the suggestions given internally
Correct way to handle sample logins or test accounts
java
This might be better done through security groups.Pseudo code:if(user.InGroup(TestAccounts)).....