dcsimg
Call a servlet from an action in a bean
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   jl_roman
Posted On:   Tuesday, December 18, 2007 04:01 AM

Hi, I need to call a servlet from an action in a bean. the servlet need two attributes pass by POST method. I can call the servlet, but nos pass the attributes. The code 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.    More>>

Hi,

I need to call a servlet from an action in a bean. the servlet need two attributes pass by POST method. I can call the servlet, but nos pass the attributes. The code 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.

   <<Less
About | Sitemap | Contact