Hi all,

I wrote a servlet for File Download. I am developing a portlet and the
download is from a DB.
So when I am in the servlet doGet() and try to receive a bean from the
FacesContext
I get a NullPointerException, here the code:

FacesContext fctx = FacesContext.getCurrentInstance();
                //DetailsBean bean =
(DetailsBean)fctx.getApplication().getVariableResolver().resolveVariable(fctx,
"detailsBean");
                ValueBinding bind = 
FacesContext.getCurrentInstance().getApplication().
                                                                
createValueBinding("#{detailsBean}");
                DetailsBean bean = (DetailsBean)bind.getValue(fctx); 

the faces-config Entry:

<managed-bean>
                <managed-bean-name>facadeService</managed-bean-name>
        
<managed-bean-class>main.org.jboss.portlet.milestone.jsf.facade.FacadeService</managed-bean-class>
                <managed-bean-scope>application</managed-bean-scope>
                <managed-property>
                        <property-name>mileStoneService</property-name>
                
<property-class>main.org.jboss.portlet.milestone.spring.service.MileStoneService</property-class>
                        <value>#{mileStoneService}</value>
                </managed-property>
                <managed-property>
                        <property-name>mileStoneSearchService</property-name>
                
<property-class>main.org.jboss.portlet.milestone.spring.service.MileStoneSearchService</property-class>
                        <value>#{mileStoneSearchService}</value>
                </managed-property>
        </managed-bean>

any ideas?

thanks in advance,
Omid
-- 
View this message in context: 
http://www.nabble.com/ValueBinding-throw-a-servlet-tf3719784.html#a10407446
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to