Hello Experts!!
I am having a problem in struts2. i m builiding an appliction which shows all the data of person after loging in. After person logs in, action loginsuccess is called <action name="loginSuccess" class="com.HT.Login.displayData"> <result name="success">/Login/loginSuccess.jsp</result> ...... </action> Class displayData, does some computatoins and load objects of arrays from DB like ArrayList<Package> pcck; ArrayList<Travel> travel=new ArrayList<Travel>(); ArrayList<Visa> visa=new ArrayList<Visa>(); ArrayList<Passenger> pass=new ArrayList<Passenger>(); all respective getters and setters are used to intitallize them and they are working fine. so Execute method returns success and loginSuccess.jsp is displayed. public String execute() throws Exception { loadData(); return "success"; } Now i want to display the values of each of these arrays in different JSP pages. so using different actions with methods called from loginsuccess.jsp. <action name="Package" class="com.HT.Login.displayData" method="pck" > <result name="success">/Login/package.jsp</result> ...... </action> <action name="Travel" class="com.HT.Login.displayData" method="tr" > <result name="success">/Login/travel.jsp</result> ...... </action> <action name="Visa" class="com.HT.Login.displayData" method="vi" > <result name="success">/Login/visa.jsp</result> ...... </action> when Package.action is called. method pck is invoked, which only returns "success" and Login/package.jsp is displayed, but there is no data in it, All the arrays are set to null with no data. same case happens with travel and visa actions. Exact problem is : Earlier i called loginSuceess and loaded all the data from DB into arrays. now if i call different methods of same class, arrays are deinitalised and no data is coming up. Please HELP!! Regards Gurvinder PS Gill Email: gurvinder...@gmail.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en -~----------~----~----~----~------~----~------~--~---