Tag: struts tags

Jquery错误 – 调用struts动作时

我正在从jquery调用struts动作,如下面的代码。 jQuery( “#dialog-form” ).dialog({ autoOpen: false, height: 300, width: 350, modal: true, buttons : { “Search” : function() { jQuery.ajax({ type : ‘POST’, url : ‘ ‘ }) } } }); 有没有办法从jquery调用struts动作?

如何从Struts 2中的选定对象获取对象属性

我有一个带有name和id字段的City对象列表。 我使用Struts2,我有一个带有select标签的jsp页面。 这是Action类 public class CalculationAction extends ActionSupport { private List cities; private DataAccessPerformer dao = new DataAccessPerformer(); private String source; private int sourceId; public CalculationAction() { cities = new ArrayList(); // getting cities from database setCities(dao.getAllCities()); } // getters and setters } Cityclass public class City { private int id; private String name; @Override […]

使用struts 2 form对象编辑对象的ArrayList

我有2个class – Student和Course 。 两者都在其内部的属性上定义了所有getter和setter。 使用这两个类,我正在尝试构建一个Web应用程序,其中包含编辑和在不同jsp页面中添加学生等常规function。 我的学生可以注册多个课程,每个学生的每门课程的分数都应该可以在应用内编辑。 现在我有一个studentMarks.jsp ,它从一个动作类加载数据 – StudentAction public class StudentAction extends ActionSupport { private static final long serialVersionUID = 1L; private List studentList; private List courseList; private HashMap<Student,List> studentCourseList; private int rollNo; private String name; private String DOB; StudentService studentService; CourseService courseService; Student student; Course course; /**** Setters and getters for […]