Cannot find bean exception ina ny scope

V

Vasu

Hi
Iam only trying to populate a multiple selection, list box in jsp using
a bean tag.
I put only the part of the code that is invoved in my error module.
I have done the same for another jsp it works.
The values are getting set to the jsp but i get an exception as "Cannot
find bean exception in any scope".
Kindly help me out.

Struts config.xml
-----------------------------
<form-bean
name="addUserForm"
type="com.bt.osat.forms.FormAddUser">
</form-bean>

I took a look at one of our mail archieves and changed the scope to
request and now back to session, if it might work.

<action path="/SelectUser"
type="com.bt.osat.actions.ActionSelectUser"
name="addUserForm"
scope="session">
<forward name="success" path="/jsp/editUser.jsp"/>
<forward name="Invalid" path="/jsp/NoAuthentication.jsp"/>
<forward name="sessionexpired" path="/jsp/sessionexpired.jsp"/>
</action>

edituser.jsp
----------------------------
<html>
<tr>
<td align=left nowrap><bean:message
key="user.select.proposition"/></td>
<td>

<bean:define id="getAllProp" name="addUserForm"
property="userPropositions" />
<html:select property="selProposition" multiple="true"
onchange="showProposition()">
<html:eek:ptions collection="getAllProp" labelProperty="label"
property="value"/>
</html:select>

</td>
</tr>
</html>

ActionSelectUser.java
----------------------------------------
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
logger.info("in execute() of ActionSelectUser.");
System.out.println("enter select user()");
/*----Session Management start-------- */
HttpSession sessionE = request.getSession(false);
if(sessionE == null) {
return
mapping.findForward(CommonConstants.MAPPING_SESSION_EXPIRED);
} else {
String pm_userId = (String)
sessionE.getAttribute(CommonConstants.USER_NAME);
if(null == pm_userId) {
return
mapping.findForward(CommonConstants.MAPPING_SESSION_EXPIRED);
}
}
/*----Session Management end-------- */

/*----Call To Authorization Manager-------- */
String actionClass = "ActionSelectUser";
logger.info("inside execute");
boolean
result=AuthenticationManager.isAuthenticatedUser(actionClass,request.getSession());
logger.info(String.valueOf(result));
if(!result) {
return mapping.findForward(CommonConstants.MAPPING_INVALID);
}
/*----End of Call To Authorization Manager-------- */

logger.info("Above casting");
FormAddUser addUserForm = (FormAddUser) form;
logger.info("After casting");

//To print the size of the array list
ArrayList temp =null;
System.out.println("&&&&&&&&&&&&&&&&&temp call&&&&&&&&&&&&&&&&&&");
temp = DAOFetchMasterRecords.getAllProposition();
System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"+temp.size());
System.out.println("&&&&&&&&&&&&&&&&&temp call
over&&&&&&&&&&&&&&&&&&");
addUserForm.setUserPropositions((Collection)DAOFetchMasterRecords.getAllProposition());
System.out.println("Props in action select");

int userId =
Integer.parseInt(request.getParameter(CommonConstants.U_ID));
User user = DAOUser.getUserDetails(userId);

logger.info("User PM key is --> " + user.getPRODMAN_KEY());


// Decode Password
BASE64Decoder base64Decoder = new BASE64Decoder();
if(null != user.getPM_PASSWORD()) {
String decodePassword = new
String(base64Decoder.decodeBuffer(user.getPM_PASSWORD()));
user.setPM_PASSWORD(decodePassword);
}
request.setAttribute(CommonConstants.USER, user);

return mapping.findForward(CommonConstants.SUCCESS);
}

}

Hope i get a solution from my friends out there.

Thanks ina dvance.

Vasudha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top