Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to load request parameters in a POJO using Struts2

 
Gustavo Armenta
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose I have a POJO Employee, how Struts 2 can initialize the POJO reading the request parameters. Assume request parameters have the same name as the POJO attribute names.

Thanks!

public class Employee {
private long id;
private String name;
private Date hireDate;
private double salary;
private boolean isFullTime;
private Department department;
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic