2 Replies Latest reply on Mar 13, 2012 3:55 PM by baddeley84

    SEAM servlet injection

    baddeley84

      Hi,

       

      I have what seems to be a basic question from a SEAM beginner, I have a standard http servlet (provided by Paypal Express Checkout) which verifies a paypal payment, once the response from paypal has been recieved I need to access my managed beans to process the payment on my side, I am guessing the best way to do this is inject the beans into the servlet, but I keep getting a NPE, I have tried a variety of methods including...

       

      @In PaymentBean paymentBean

      PaymentBean paymentBean = (PaymentBean) Contexts.getConversationContext().get("PaymentBean")

      paymentBean
      = ((PaymentBean)Component.getInstance("paymentBean"));

       

      But keep getting null values

       

      Am I missing something, should I be injecting the servlet response into the managed bean instead?

       

      Help appreciated

       

      David

       

      -JBoss AS 6

      -SEAM 2.2