#servlet

EJB Injection in JSP with Java EE 7

User suexec asked ##java about accessing an EJB from a JSP template. User dreamreal (i.e., your author) put together a simple application (rather imaginatively called “suexec-war” ) to explore the possibilities. The application was built from Adam Bien‘s minimalistic Java EE 7 Maven archetype, deployed into Wildfly 10.0. It turns out that to the best of my understanding, injection of an EJB into a JSP is simply unsupported. The JSP can use...

2 minute(s) read

Tomcat and JNDI

Let’s consider the standard baseline Java EE application: it’s a web application, with some kind of framework, using JDBC or something that wraps it. In canonical Java EE form, it would be a JSF front end and request routing mechanism, with JPA as the data framework, with resources acquired via JNDI. (Note: “canonical Java EE form” doesn’t imply in any way that this is what people actually do, because normally people avoid...

7 minute(s) read