Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Cannot find bean in request scope

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Presently i am involved in a fully well designed MVC application which involves Struts 1.3, JSP's (JSTL), Custom tags, AJAX, JavaSrcipt, SiteMesh and SLV frameworks.

1. There is a drop down which needs to be populated with additional values. The JSP code that displays these values looks something like this:
<td valign="top" nowrap class="bodysm"><span
class="formlabelsm"> <fmt:bundle
<fmt:message key="global.label.orderdate" />:
</fmt:bundle> </span> <c:out value="${currentOrder.oqDetail.orderDateAsString}" /></td>
<td nowrap class="bodysm"> </td>
<td valign="top" nowrap class="bodysm"><span
class="formlabelsm"> <fmt:bundle
<fmt:message key="global.label.shipmethod" />:
</fmt:bundle> </span> <c:set var="shipMethod"
value="${currentOrder.oqDetail.shipMethod}" /> <fmt:bundle
<fmt:message key="shipmethod.${shipMethod}"
It is retrieving from the shipmethod using EL and custom tags defined.

2. In the Struts class that is being used, there is a method which looks something like this. It is setting the values in the OrderHeaderDropDown which is a bean class through maps and all the KEY_ values are constants.
public String populateDropdown(Counter counter, HttpServletRequest request, OrderQuoteDetail orderQuoteDetail) {
String type = null;
OrderHeaderDropDown orderHeaderDropDown = new OrderHeaderDropDown();
try {
if (orderQuoteDetail.getOqDetail().getOrderType() != null
&& !(orderQuoteDetail.getOqDetail().getOrderType()
.equals(EMPTY_STRING))) {
type = orderQuoteDetail.getOqDetail().getOrderType();
Map<String, List<KeyValue>> dropDownValues = (Map<String, List<KeyValue>>) BusinessServicesDelegate
counter, type, Util.getCurrentUser(),orderQuoteDetail);
// populate ordertype dropdown
// populate ordersource dropdown
// populate Acknowledgement dropdown
// populate Pricing dropdown
// populate ShipMethod dropdown
// populate carrier dropdown

3. In the Bussiness class used for logic, it is getting the list from the application session. The Method code uses several .properties files to retrieve some values.
public List<KeyValue> getShipMethods(Counter counter, User userVo) throws ApplicationException,
FrameworkException {
List<KeyValue> shipMethodList = new ArrayList<KeyValue>();
Locale userLocal = userVo.getLocaleObject();
String localeVal = userLocal.toString();
String dcmKey = "ShipMethodsList_" + localeVal;
// Get the cache manager object
DataCacheManager cacheManager = BusinessServicesDelegate.getBslCacheManager();
try {
// Data is present in the Cache.
shipMethodList = (List<KeyValue>) cacheManager.fetchFromCache(dcmKey);
} catch (FrameworkException fr) {
//Taking resource bundle
ResourceBundle d2erpResources = ResourceBundle.getBundle("messages/D2ERPCodes",userLocal);
KeyValue keyValue = new KeyValue();
.getString(resourceString + SHIPMETHOD_UPS_GROUND_FREE).toString().trim());

I want to add new values in the Business class so that it can be displayed in the presentation part.

Currently i am getting the "cannot find bean orderheaderdropdown in request scope error".

Can you people analyze the codes and help me being free from the error !!!

Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.
David Newton
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Show us where you put the value in question into request scope.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic