Sorry about that, here is the error listing.....

21-Aug-2006 3:16:04 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: Cannot get value for expression
'#{country.countryList}'
        at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
        at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
        at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)



Andrew Robinson-5 wrote:
> 
> I don't see in your JSP "#{bean.list}", according to the error, that
> expression should be somewhere in the page.
> 
> On 8/21/06, tukutela <[EMAIL PROTECTED]> wrote:
>>
>> Hi all,
>>
>> I'm just starting out with Java/JSF having come from a .net c#
>> background.
>> I'm having some trouble in starting out with JSF and I was hoping that
>> someone can point me in the right direction, this error is driving me
>> nuts!!!
>>
>> I'm using MyEclipse and the server is Apache2, Tomcat5.5, and MyFaces
>> 1.1.1.
>> I'm trying to fill a selectOneMenu list using a backend bean and are
>> getting
>> an error that says that the server cannot get value from expression
>> #{bean.list}
>>
>> Here's the JSP code
>> <h:selectOneMenu id="countryListItems" styleClass="lists"
>> value="#{country.selectedCountry}">
>>                                 <f:selectItems
>> value="#{country.countryList}" />
>> </h:selectOneMenu>
>>
>> Here's the Bean
>>
>> package com.blah.mgr;
>>
>> public class Country {
>>
>>         private ArrayList<SelectItem> countryList; //variable array list
>> to display
>> set to countries.
>>
>>         // Constructor, initializes class variables, sets up connection
>> with
>> database.
>>         public Country()
>>         {
>>                 buildList();
>>         }
>>
>>         // Returns the arrayList, ensure that the constructor reads the
>> database
>> first.
>>         public ArrayList getCountryList()
>>         {
>>                 return this.countryList;
>>         }
>>
>>         // Sets the country List (not really required but in here anyway.
>>         public void setCountryList(ArrayList<SelectItem> CountryList)
>>         {
>>                 this.countryList = CountryList;
>>         }
>>
>>         private void buildList()
>>         {
>>                 countryList.add(new SelectItem("Canada", "Canada"));
>>                 countryList.add(new SelectItem("US", "US"));
>>         }
>> }
>>
>> Here's the link in faces-config.xml:
>>   <managed-bean>
>>         <managed-bean-name>country</managed-bean-name>
>> <managed-bean-class>com.blah.mgr.Country</managed-bean-class>
>>         <managed-bean-scope>session</managed-bean-scope>
>>   </managed-bean>
>>
>> I'm sure the solution is simple but I've found it difficult to get good
>> documentation, might be where I'm looking (or not looking) but I'm still
>> getting lost. Any help is greatly appreciated, thanks in advance.
>> --
>> View this message in context:
>> http://www.nabble.com/Newbie-Question-tf2141924.html#a5912338
>> Sent from the MyFaces - Users forum at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Newbie-Question-tf2141924.html#a5913161
Sent from the MyFaces - Users forum at Nabble.com.

Reply via email to