aspose file tools*
The moose likes Struts and the fly likes Cannot Find  Bean inscope null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Cannot Find  Bean inscope null" Watch "Cannot Find  Bean inscope null" New topic
Author

Cannot Find Bean inscope null

rakshini nithya
Ranch Hand

Joined: Jun 15, 2006
Posts: 39
Hi
When i try to run my program am getting this following error
MyAction
/*
* Created on Jul 12, 2006
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com.cognizant.teamprofile.action;

//import java.util.List;

//import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.cognizant.teamprofile.actionform.MemberInfo;
import com.cognizant.teamprofile.actionform.SearchMemberTeamProfileForm;
import com.cognizant.teamprofile.dao.SearchMemberTeamProfileData;

//import com.cognizant.teamprofile.dao.SearchTeamMemberData;

/**
* @author 133474
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class SearchMemberHNTeamProfileAction extends Action {
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
{
SearchMemberTeamProfileForm searchmemberteamprofileform=(SearchMemberTeamProfileForm)form;
SearchMemberTeamProfileData searchmemberteamprofiledata=new SearchMemberTeamProfileData();
/* List member=searchmemberteamprofiledata.Search1(searchmemberteamprofileform);
request.setAttribute("Member",member);

if (member != null && member.size() > 0) {
for (int i = 0; i < member.size(); i++) {
MemberInfo memberInfo = (MemberInfo)member.get(i);
System.out.println("FirstName"+memberInfo.getFirstName());
System.out.println("LastName"+memberInfo.getLastName());
System.out.println("EmployeeID"+memberInfo.getEmployeeID());
System.out.println("EmailID"+memberInfo.getEmailID());
System.out.println("Vnet"+memberInfo.getVnet());
System.out.println("Extension"+memberInfo.getExtension());
System.out.println("MobileNumber"+memberInfo.getMobileNumber());
}
}*/

MemberInfo memberinfo=searchmemberteamprofiledata.Search1(searchmemberteamprofileform);
request.setAttribute("MemberInfo",memberinfo);

{
System.out.println("FirstName"+memberinfo.getFirstName());
System.out.println("LastName"+memberinfo.getLastName());
System.out.println("EmployeeID"+memberinfo.getEmployeeID());
System.out.println("EmailID"+memberinfo.getEmailID());
System.out.println("Vnet"+memberinfo.getVnet());
System.out.println("Extension"+memberinfo.getExtension());
System.out.println("MobileNumber"+memberinfo.getMobileNumber());

}

// Forward control to the specified success target
return (mapping.findForward("success"));


}
}
My Struts Config
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

<struts-config>

<!-- ========== Form Bean Definitions ================= -->
<form-beans>

<form-bean name="loginTeamProfileForm"
type="com.cognizant.teamprofile.actionform.LoginTeamProfileForm"/>
<form-bean name="memberinfo"
type="com.cognizant.teamprofile.actionform.MemberInfo"/>
<form-bean name="searchMemberTeamProfileForm"
type="com.cognizant.teamprofile.actionform.SearchMemberTeamProfileForm"/>
<form-bean name="searchMember1TeamProfileForm"
type="com.cognizant.teamprofile.actionform.SearchMember1TeamProfileForm"/>
<form-bean name="forgotPasswordTeamProfileForm"
type="com.cognizant.teamprofile.actionform.ForgotPasswordTeamProfileForm"/>
<form-bean name="addMemberTeamProfileForm"
type="com.cognizant.teamprofile.actionform.AddMemberTeamProfileForm"/>
<form-bean name="updateMemberTeamProfileForm"
type="com.cognizant.teamprofile.actionform.UpdateMemberTeamProfileForm"/>
<form-bean name="searchMemberResultsTeamProfileForm"
type="com.cognizant.teamprofile.actionform.SearchMemberResultsTeamProfileForm"/>
<form-bean name="viewMemberTeamProfileForm"
type="com.cognizant.teamprofile.actionform.ViewMemberTeamProfileForm"/>
<form-bean name="viewMember1TeamProfileForm"
type="com.cognizant.teamprofile.actionform.ViewMember1TeamProfileForm"/>
<form-bean name="deleteMemberTeamProfileForm"
type="com.cognizant.teamprofile.actionform.DeleteMemberTeamProfileForm"/>
<form-bean name="deleteMember1TeamProfileForm"
type="com.cognizant.teamprofile.actionform.DeleteMember1TeamProfileForm"/>
<form-bean name="confirmationSuccessMemberTeamProfileForm"
type="com.cognizant.teamprofile.actionform.ConfirmationSuccessMemberTeamProfileForm"/>
</form-beans>

<!-- ========== Global forwards ============ -->
<global-forwards>

<forward name="search" path="/searchmember.jsp"/>

</global-forwards>

<!-- ========== Action Mapping Definitions ============ -->
<action-mappings>

<action path="/loginhnteamprofile"
type="com.cognizant.teamprofile.action.LoginHNTeamProfileAction"
name="loginTeamProfileForm"
attribute="FormBean"
input="/login.jsp"
scope="session">
<forward name="success" path="/searchmember.jsp"/>
<forward name="search1" path="/searchmember1.jsp"/>

<forward name="failure" path="/login.jsp"/>
</action>
<action path="/searchmemberhnteamProfile"
type="com.cognizant.teamprofile.action.SearchMemberHNTeamProfileAction"
name="searchMemberTeamProfileForm"
attribute="FormBean"
input="/searchmember.jsp"
scope="session">
<forward name="success" path="/searchmemberresults.jsp"/>
<forward name="searchresult" path="/searchmemberresults1.jsp"/>
<forward name="failure" path="/searchmember.jsp"/>
</action>
<action path="/searchmemberhnteamprofile"
type="com.cognizant.teamprofile.action.SearchMemberHNTeamProfileAction"
name="searchMemberTeamProfileForm"
attribute="FormBean"
parameter="Search"
input="/searchmember.jsp"
scope="session">
<forward name="success" path="/searchmemberresults.jsp"/>
<forward name="searchresult" path="/searchmemberresults1.jsp"/>
<forward name="failure" path="/searchmember.jsp"/>
</action>
<action path="/searchmemberhnteamprofile"
type="com.cognizant.teamprofile.action.SearchMemberHNTeamProfileAction"
name="searchMemberTeamProfileForm"
attribute="FormBean"
parameter="Update"
input="/searchmember.jsp"
scope="session">
<forward name="success" path="/searchmemberresults.jsp"/>
<forward name="searchresult" path="/searchmemberresults1.jsp"/>
<forward name="failure" path="/searchmember.jsp"/>
</action>
<action path="/searchmember1teamprofile"
type="com.cognizant.teamprofile.action.SearchMember1TeamProfileAction"
name="searchMember1TeamProfileForm"
attribute="FormBean"
input="/searchmember1.jsp"
scope="session">
<forward name="success" path="/searchmemberresults1.jsp"/>
<forward name="searchresult" path="/searchmemberresults.jsp"/>
<forward name="failure" path="/searchmember1.jsp"/>
</action>
<action path="/forgotpasswordteamprofile"
type="com.cognizant.teamprofile.action.ForgotPasswordTeamProfileAction"
name="forgotPasswordTeamProfileForm"
attribute="FormBean"
input="/forgotpassword.jsp"
scope="session">
<forward name="success" path="/mail.jsp"/>
<forward name="failure" path="/forgotpassword.jsp"/>
</action>
<action path="/searchmemberresultsteamprofile"
type="com.cognizant.teamprofile.action.SearchMemberResultsTeamProfileAction"
name="searchMemberResultsTeamForm"
input="/searchmemberresults.jsp"
scope="request">
<forward name="success" path="/searchmember.jsp"/>
<forward name="failure" path="/searchmemberresults.jsp"/>
</action>
<action path="/addmemberteamprofile"
type="com.cognizant.teamprofile.action.AddMemberTeamProfileAction"
name="addMemberTeamProfileForm"
attribute="FormBean"
input="/addmember.jsp"
scope="session">
<forward name="success" path="/confirmationsuccess.jsp"/>
<forward name="failure" path="/addmember.jsp"/>
</action>
<action path="/viewmember1teamprofile"
type="com.cognizant.teamprofile.action.ViewMember1TeamProfileAction"
name="viewMember1TeamProfileForm"
attribute="FormBean"
input="/viewmember1.jsp"
scope="session">
<forward name="success" path="/viewmember.jsp"/>
<forward name="failure" path="/viewmember1.jsp"/>
</action>
<action path="/deletemember1teamprofile"
type="com.cognizant.teamprofile.action.DeleteMember1TeamProfileAction"
name="deleteMember1TeamProfileForm"
attribute="FormBean"
input="/viewmember1.jsp"
scope="session">
<forward name="success" path="/deletemember.jsp"/>
<forward name="failure" path="/deletemember1.jsp"/>
</action>
<action path="/viewmemberteamprofile"
type="com.cognizant.teamprofile.action.ViewMemberTeamProfileAction"
name="viewMemberTeamProfileForm"
attribute="FormBean"
input="/viewmember.jsp"
scope="session">
<forward name="success" path="/searchmember.jsp"/>
<forward name="failure" path="/viewmember.jsp"/>
<forward name="search1" path="/searchmember1.jsp"/>
</action>
<action path="/updatememberteamprofile"
type="com.cognizant.teamprofile.action.UpdateMemberTeamProfileAction"
name="updateMemberTeamProfileForm"
attribute="FormBean"
input="/updatemember.jsp"
scope="session">
<forward name="success" path="/searchmember.jsp"/>
<forward name="search1" path="/searchmember1.jsp"/>
<forward name="failure" path="/updatemember.jsp"/>
</action>
<action path="/deletememberteamprofile"
type="com.cognizant.teamprofile.action.DeleteMemberTeamProfileAction"
name="deleteMemberTeamProfileForm"
attribute="FormBean"
input="/deletetemember.jsp"
scope="session">
<forward name="success" path="/searchmember.jsp"/>
<forward name="failure" path="/deletemember.jsp"/>
</action>

<action path="/confirmationsuccessmemberteamprofile"
type="com.cognizant.teamprofile.action.ConfirmationSuccessMemberTeamProfileAction"
name="confirmationSuccessMemberTeamProfileForm"
attribute="FormBean"
input="/confirmationsuccess.jsp"
scope="session">
<forward name="success" path="/searchmember.jsp"/>
<forward name="search1" path="/searchmember1.jsp"/>
<forward name="failure" path="/confirmationsuccess.jsp"/>
</action>

</action-mappings>

</struts-config>
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
In order to help you with this, we'll need to know:

1-What URL did you send to the server before getting the error?
2-What was the specific error? Post of the stack trace also.
3-Post the JSP you were trying to display at the time of the error.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot Find Bean inscope null