JSP выглядит так: < /p>
Код: Выделить всё
< /code>
Это делает: < /p>
< /code>
Когда я отправляю форму, однако, поля Application.appname не входит в объект приложения.
action: < /p>
public class UpdateApplication extends ActionSupport implements SessionAware, ServletResponseAware {
private String checkThis;
private AppMapping application;
public String newApp() throws Exception {
:
application.getAppName(); //This throws an exception because application is null
:
}
public void setApplication(AppMapping application) {
this.application = application;
}
public void setCheckThis(String checkThis) {
this.checkThis = checkThis;
}
}
< /code>
и класс приложений выглядит так: < /p>
public class AppMapping{
private String appName;
public AppMapping() {}
public void setAppName(String appName) {
this.appName = appName;
}
}
I've tried setting "struts.disallowProxyObjectAccess=false" in the struts.properties but that didn't work. I tried a few other things that didn't work either. I thought it was maybe the camelcasing but it's not that either. I've set breakpoints in the setApplication() method in the action class but it does not get hit.
Any help would be appreciated.
Подробнее здесь: https://stackoverflow.com/questions/796 ... to-objects