Стойки 6.4.0 Не настраивая входы в объектыJAVA

Программисты JAVA общаются здесь
Anonymous
Стойки 6.4.0 Не настраивая входы в объекты

Сообщение Anonymous »

Я мигрирую приложение из стойки 2.* до 6.4.0. Но я вижу проблему, когда форма отправляется из JSP. < /P>
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;
}
}
So the problem is that the application.appName is not creating the AppMapping application object and populating into the application object. With Struts 2.x, this worked. But with 6.4.0, the application is not receiving the inputs from the form. The checkThis attribute is being populated however.
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

Вернуться в «JAVA»