JAVA: how to load database url from web.xml?

Posted by user357255 on Stack Overflow See other posts from Stack Overflow or by user357255
Published on 2010-06-03T08:52:10Z Indexed on 2010/06/03 8:54 UTC
Read the original article Hit count: 156

I'm using persistence API and want to load jdbc URL from web.xml. URL should be a context parameter of servlet. I can't find how to construct EntityManagerFactory not using persistence.xml. May be I should create PersistenceUnit in servlet and set some parameters? Can you give me some short example?

Thank you

© Stack Overflow or respective owner

Related posts about servlets

Related posts about jpa