最近開始在密集接觸struts中,因為工作上可能還是會接觸到1.x的版本,因此就從 struts 1.3 開始摸,不過沒想到中間碰到了一些改版後被改調的方法,所以特別記錄下來。

// 1.0
if(servlet.getDebug()>=Constants.DEBUG)

// 1.1
if(Integer.parseInt(servlet.getInitParameter("debug"))>=Constants.DEBUG)


//1.0
errors.add(ActionError.GLOBAL_MESSAGE,new ActionError("."))

//1.1 之後沒有了 ActionError,改用 ActionMessage
errors.add(ActionMessages.GLOBAL_MESSAGE,.
new ActionMessage("error.logon.invalid"));


// 1.0
public ActionForward perform
// 1.2.4 之後
public ActionForward execute

arrow
arrow
    全站熱搜

    shikua 發表在 痞客邦 留言(0) 人氣()