Hi Felipe, I think the first option will give the desired output for error500. Reagarding the second option there is no constructor for ServletException which takes int as the first argument. The valid costructors are as follows:
public javax.servlet.ServletException(); public javax.servlet.ServletException(java.lang.String); public javax.servlet.ServletException(java.lang.String,java.lang.Throwable);
public javax.servlet.ServletException(java.lang.Throwable);