• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Cannot find bean in request scope

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
<tr>
<td valign="top" nowrap class="bodysm"><span
class="formlabelsm"> <fmt:bundle
basename="messages/D2Messages">
<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
basename="messages/D2Messages">
<fmt:message key="global.label.shipmethod" />:
</fmt:bundle> </span> <c:set var="shipMethod"
value="${currentOrder.oqDetail.shipMethod}" /> <fmt:bundle
basename="messages/D2ERPCodes">
<fmt:message key="shipmethod.${shipMethod}"
/>[/u]
</fmt:bundle></td>
</tr>
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
.executeService(ORDERENTRYMANAGER, METHOD_INITPAGE,
counter, type, Util.getCurrentUser(),orderQuoteDetail);
// populate ordertype dropdown
orderHeaderDropDown.setOrderTypeList(dropDownValues.get(OrderEntryConstant.KEY_GETORDERTYPE));
// populate ordersource dropdown
orderHeaderDropDown.setOrderSourceList(dropDownValues.get(OrderEntryConstant.KEY_GETORDERSOURCE));
// populate Acknowledgement dropdown
orderHeaderDropDown.setAcknowledgementMethodList(dropDownValues.get(OrderEntryConstant.KEY_GETACK1DROPDOWNLIST));
// populate Pricing dropdown
orderHeaderDropDown.setPricingAcknowledgementList(dropDownValues.get(OrderEntryConstant.KEY_GETACKPRICE));
// populate ShipMethod dropdown
orderHeaderDropDown.setShipMethodList(dropDownValues.get(OrderEntryConstant.KEY_GETSHIPMETHODS));
// 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 {
counter.startBusinessCounter();
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);
String resourceString = SHIPMETHOD_RESOURCE_PREFIX + DOT;
KeyValue keyValue = new KeyValue();
keyValue.setKey(SHIPMETHOD_UPS_GROUND_FREE);
keyValue.setValue(d2erpResources
.getString(resourceString + SHIPMETHOD_UPS_GROUND_FREE).toString().trim());
shipMethodList.add(keyValue);


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 !!!

Thanks,
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Show us where you put the value in question into request scope.
 
You firghten me terribly. I would like to go home now. Here, take this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic