| @Override
  |     protected void doGet(HttpServletRequest req, HttpServletResponse resp) 
throws ServletException, IOException {
  |             try {
  |                     
  |                     String configId = req.getParameter("id");
  |                     
  |                     EntityManagerFactory factory = 
(EntityManagerFactory)Naming.getInitialContext().lookup("java:/EntityManagerFactory");
  |                     EntityManager em = factory.createEntityManager();
  |                     Config config = (Config)em.find(Config.class, new 
Long(configId));
  |                     
  |                     resp.setContentType(config.getFileType());
  |                     
  |                     resp.getOutputStream().write(config.getFileData());
  |             }
  |             catch(Exception e){e.printStackTrace();}
  |     }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989049#3989049

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989049
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to