[jboss-user] [JBoss Seam] - Re: jndi - tomcat - jsp file

zielonyplot do-not-reply at jboss.com
Thu Apr 26 03:59:02 EDT 2007


So, in  my servlet, I simply need to write something like this:


  | import java.io.*;
  | import javax.servlet.*;
  | import javax.servlet.http.*;
  | 
  | public class SomeServlet extends HttpServlet 
  | {
  |   
  |    @PersistenceContext  
  |    private EntityManager em;
  | 
  |   public void doGet(HttpServletRequest request,
  |                     HttpServletResponse response)
  |       throws ServletException, IOException 
  |      {
  |       
  |            List lista = em.createQuery("from Topologia").getResultList();
  |            ........
  |            ........
  |            ........
  | 
  |      }
  | }
  | 

And It will work, right?

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040848



More information about the jboss-user mailing list