When I rebuilded my classes, Tomcat throws error HTTP 500 with "Unable to
instantiate Action, test.Settings, defined for 'Settings' in namespace
'/'null - action...". Earlier, my app builds without errors... This error is
because I try to staticly instatiate the Account class?
My rebuilded classes:
Account:
************
package test;
public class Account extends BankSupport{ //BankSupport
extends ActionSupport
public Account() {
}
private int currentAmount = 0;
public void setCurrentAmount(int _currentAmount){
currentAmount = _currentAmount;
}
public int getCurrentAmount(){
return currentAmount;
}
}
****************
Settings class
****************
package test;
public class Settings extends BankSupport{
Account ac1, ac2, ac3;
public Settings() {
ac1.setCurrentAmount(500);
ac2.setCurrentAmount(300);
ac3.setCurrentAmount(0);
}
public String execute(){
return SUCCESS;
}
}
*******************
My index.jsp is without changes.
My struts.xml:
*******************
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<include file="bank.xml"/>
</struts>
****************
and my bank.xml:
****************
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="test" extends="struts-default">
<action name="Settings" class="test.Settings">
<result name = "success" >index.jsp</result>
</action>
</package>
</struts>
******************
all looks good - so where`s bug?
Regards,
C.
--
View this message in context:
http://www.nabble.com/-S2--sending-multiple-%27bank-account%27-objects-to-view-page-tf3693561.html#a10334138
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]