Buggy code:
public class MemberAction extends BaseAction { private static final long serialVersionUID = 3885107140454981767L ; private String choice ; private int questionid ; private String name ; private String password ; private String bankcard ; private String paypassword ; private String birthday ; private String sex ; private String city ; private String area ; private String street ; private String oldpassword ; private String oldpaypassword ; private int planid ; private int amount ; private int targetPage ; HashMap < String , String > toJsonMap = new HashMap < String , String > ( ) ; BaseDao baseDao ; MemberManager memberManager ; TicketManager ticketManager ; PlanManager planManager ; PayManager payManager ; PromoteManager promoteManager ; public void setPromoteManager ( PromoteManager promoteManager ) { } public void setBaseDao ( BaseDao baseDao ) { } public int getPlanid ( ) { } public void setPlanid ( int planid ) { } public int getTargetPage ( ) { } public void setTargetPage ( int targetPage ) { } public void setMemberManager ( MemberManager memberManager ) { } public void setTicketManager ( TicketManager ticketManager ) { } public void setPlanManager ( PlanManager planManager ) { } public void setPayManager ( PayManager payManager ) { } public HashMap < String , String > getToJsonMap ( ) { } public String getName ( ) { } public void setName ( String name ) { } public String getPassword ( ) { } public void setPassword ( String password ) { } public String getBankcard ( ) { } public void setBankcard ( String bankcard ) { } public String getPaypassword ( ) { } public void setPaypassword ( String paypassword ) { } public String getBirthday ( ) { } public void setBirthday ( String birthday ) { } public String getSex ( ) { } public void setSex ( String sex ) { } public String getCity ( ) { } public void setCity ( String city ) { } public String getArea ( ) { } public void setArea ( String area ) { } public String getStreet ( ) { } public void setStreet ( String street ) { } public String getOldpassword ( ) { } public void setOldpassword ( String oldpassword ) { } public String getOldpaypassword ( ) { } public void setOldpaypassword ( String oldpaypassword ) { } public int getAmount ( ) { } public void setAmount ( int amount ) { } public void setToJsonMap ( HashMap < String , String > toJsonMap ) { } public String getChoice ( ) { } public void setChoice ( String choice ) { } public int getQuestionid ( ) { } public void setQuestionid ( int questionid ) { } public String info ( ) { } public String history ( ) { } public String change_info ( ) { } public String recharge ( ) { } public String exchange_integral ( ) { } public String cancel_member ( ) { } public String buy_ticket ( ) { } public String attend_activity ( ) { } private boolean checkMemberValid ( String memberid ) { } public String memberAnswerQuestion ( ) { } public String changeInfo ( ) { } public String cancelMembership ( ) { } public String exchangeIntegral ( ) { } public String doRecharge ( ) { } public String planInfo ( ) { } public String history_ticket ( ) { String memberid = ( ( String ) ( session . get ( "userid" ) ) ) ; List < Ticket > tickets = memberManager . getMemberTickets ( memberid ) ; int defaultSize = 5 ; int ticketPageSize = ( ( ( tickets . size ( ) ) + defaultSize ) - 1 ) // defaultSize ; if ( ( targetPage ) > ticketPageSize ) { targetPage = ticketPageSize ; } if ( ( targetPage ) <= 0 ) { targetPage = 1 ; } int ticketMaxIndex = ( ( defaultSize * ( targetPage ) ) > ( tickets . size ( ) ) ) ? tickets . size ( ) : defaultSize * ( targetPage ) ; List < Ticket > ticket_target = new ArrayList < Ticket > ( defaultSize ) ; for ( int i = defaultSize * ( ( targetPage ) - 1 ) ; i < ticketMaxIndex ; i ++ ) { ticket_target . add ( tickets . get ( i ) ) ; } request . setAttribute ( "tickets" , ticket_target ) ; request . setAttribute ( "ticketPageSize" , ticketPageSize ) ; <START_BUG> request . setAttribute ( "rechargeIndex" , targetPage ) ; <END_BUG> return "history" ; } public String history_member ( ) { } public String history_recharge ( ) { } }

Fix:
request . setAttribute ( "ticketIndex" , targetPage ) ;