1 Reply Latest reply on Dec 20, 2007 8:16 AM by pmuir

    Call to a servlet from an action in a bean

    jlrocam

      Hi,
      I have a problem. I need to call a sevlet from an action in my bean. This servlet need two parameters sending in POST method. I can run de servlet, but i cant't pass the parameter/attributes. The code i use is:

      FacesContext context = FacesContext.getCurrentInstance();
      ExternalContext ectx = context.getExternalContext();
      HttpServletRequest request = (HttpServletRequest)ectx.getRequest();
      HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
      request.setAttribute(�xmlstr�,InfBean.getXmlstr());
      request.setAttribute(�xlst�,�c:\\jboss�);
      RequestDispatcher dispatcher = request.getRequestDispatcher(�/fop/fop�);

      Can anybody help me!
      Thanks