public class ProjectShowPictAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm actionform,
HttpServletRequest request, HttpServletResponse response) throws Exception {
String id=request.getParameter("id");
byte[] photo=null;
ProjectDao pd=new ProjectDao();
if(id!=null&&!"".equals(id)){
photo=pd.queryPhoto(id);
if(photo!=null){
response.setContentType("image/*");
response.getOutputStream().write(photo);
response.getOutputStream().close();
}
}
return null;
}
}