Then either lettersession or user is null when you try to use it. Figure out which and prevent it from causing an exception.
Originally posted by shaf maff:
Do you mean a return false after each statment ? I tried that and it gives me a cannot return value from a method whose result type is void.
No, not return false. Just return; The idea is that once you do a sendRedirect you want to make sure that none of the rest of the code in the method (the code after the if/else statements) gets executed.
An alternative is to put all your code inside the if/else clauses so there doesn't need to be artificial returns:
Which you do depends on style.
[ September 26, 2008: Message edited by: Steve Luke ]