/** * Display User Profile information such as address, email, etc. for the given Trader Dispatch to * the Trade Account JSP for display * * @param userID The User to display profile info * @param ctx the servlet context * @param req the HttpRequest object * @param resp the HttpResponse object * @param results A short description of the results/success of this web request provided on the * web page * @exception javax.servlet.ServletException If a servlet specific exception is encountered * @exception javax.io.IOException If an exception occurs while writing results back to the user */ void doAccount( ServletContext ctx, HttpServletRequest req, HttpServletResponse resp, String userID, String results) throws javax.servlet.ServletException, java.io.IOException { try { AccountDataBean accountData = tAction.getAccountData(userID); AccountProfileDataBean accountProfileData = tAction.getAccountProfileData(userID); ArrayList orderDataBeans = (TradeConfig.getLongRun() ? new ArrayList() : (ArrayList) tAction.getOrders(userID)); req.setAttribute("accountData", accountData); req.setAttribute("accountProfileData", accountProfileData); req.setAttribute("orderDataBeans", orderDataBeans); req.setAttribute("results", results); requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.ACCOUNT_PAGE)); } catch (java.lang.IllegalArgumentException e) { // this is a user error so I will // forward them to another page rather than throw a 500 req.setAttribute("results", results + "could not find account for userID = " + userID); requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.HOME_PAGE)); // log the exception with an error level of 3 which means, handled exception but would // invalidate a automation run Log.error( "TradeServletAction.doAccount(...)", "illegal argument, information should be in exception string", e); } catch (Exception e) { // log the exception with error page throw new ServletException( "TradeServletAction.doAccount(...)" + " exception user =" + userID, e); } }