Correct way to handle sample logins or test accounts
<p>In my JSP web application, I want to redirect sample users to a different page from the real users.</p>

<p>Currently we do something like</p>

<pre><code>if((user.getName().equalsIgnoreCase("Sample")) ...
</code></pre>

<p>This is (a) hardcoded and (b) executed for each normal user as well.</p>

<p>Is there a better way to handle this logic?</p>

<p>I am loathe to redirect these users via Javascript validation - which is one of the suggestions given internally</p>
