On Jul 1, 2008, at 6:21 PM, purdticker wrote:


At the top of my jsp:

<%!
@EJB(name="ejb/ReportTrends")
private ReportTrends rt;
%>

Within the body tags:

   <%
   if (rt != null) {
        out.println(rt.getData());
   }
   else {
        out.println("rt is null");
   }
   %>

The page displays "rt is null".

I've tried this same code inside a servlet and rt is not null.  Is it
possible to inject an EJB directly into a jsp?

Annotations/injections are not supported in jsps as far as I can tell from reading the servlet and jsp specs. If you can find some indications they are supported they might not be too hard to implement.

thanks
david jencks



If this is a bug, please create a JIRA.
--
View this message in context: 
http://www.nabble.com/Injecting-EJB-directly-into-a-JSP-tp18228470s134p18228470.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Reply via email to