View Review Details


Book:   Programming Jakarta Struts
Subject:   Programming Jakarta Struts Review
Date:   2003-10-06 19:49:15
From:   Brian DeRocher
Rating:  StarStarStarStarStar

David Trussel, Thomas H.,


I solved the


org.apache.jasper.JasperException:


Cannot find bean FeaturedItemsKey in any scope


problem. It appears we were all doing the same thing.


That is writing the code by hand to learn it better,


instead of just plugging and chugging.


The problem is we were never invoking com.oreilly.


struts.storefront.catalog.FeaturedPageAction as


prescribed in struts-config.xml. You see that's


where the bean gets registerd or whatever.


Why wan't it being invoked? Because...


<action path="/home" ....> wasn't being called.


We were calling http://..../storefront/index.jsp


directly. Instead we should call .../storefront


and let it load welcome.jsp, which redirects to


<logic:forward name="welcome" /> and again in


struts-config.xml we have


<forward name="welcome" path="/action/home" />


That's the problem there... that line is not in the


Complete struts-config.xml file on page 96.


So i suggest getting storefront.war from oreilly's


web site and looking at the struts-config.xml in


there.