public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
try {
int myID = 0;
String myUsername = null;
PersonPrincipal me;
try {
me = (PersonPrincipal)(SecurityHelper.getUserPrincipal(req));
} catch (AuthenticationException e) {
res.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
return;
}
myID = me.getPerson().getId();
myUsername = me.getPerson().getUserId();
String requestedUsername = req.getPathInfo();
if (requestedUsername == null || requestedUsername.equals("/")) {
res.sendError(HttpServletResponse.SC_BAD_REQUEST, "No iCal file requested.");
return;