教育行業(yè)A股IPO第一股(股票代碼 003032)

全國咨詢/投訴熱線:400-618-4000

問答>JavaEE>attributeReplaced()語法定義格式是怎么樣的?

attributeReplaced()語法定義格式是怎么樣的?

來源傳智教育2022年04月25日 14時11分24秒

  當(dāng)被監(jiān)聽的域?qū)ο笾械哪硞€屬性被替換時,Web容器會調(diào)用事件監(jiān)聽器的attributeReplaced()方法進行響應(yīng)。這個方法在各個域?qū)傩员O(jiān)聽器中的完整語法定義如下。

public void attributeReplaced(ServletContextAttributeEvent scab)

public void attributeReplaced(HttpSessionBindindEvent se)

public void attributeReplaced(ServletRequestAttributeEvent srae)

  這些方法接收的參數(shù)類型與上面講解的attributeAdded()方法一樣,監(jiān)聽器可以通過這個參數(shù)來獲取正在替換屬性的域?qū)ο蟆?/p>

和我們在線交談!