protected ActionForward process(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws JGossipException {
if (!Configurator.getInstance().getBoolean(IConst.CONFIG.ENABLE_AVATAR)) { return (mapping
.findForward(IConst.TOKEN.DENIED)); }
ProcessUserForm puForm = (ProcessUserForm) form;
ForumDAO dao = ForumDAO.getInstance();
response.setContentType(IConst.JSP.JPG_CONTENT_TYPE);
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
try {
ServletOutputStream out = response.getOutputStream();
byte[] data = dao.getAvatar(puForm.getUid());
out.write(data);
} catch (IOException e) {
throw new SystemException(e);
}
return null;