2010-09-08 153 views
0

我在一個名爲titleValue的jsp頁面上有一個名爲titleValue的值我需要在第二個jsp頁面顯示此值..請告訴我如何顯示此內容第二頁的價值或如何在第二頁x:out$titleValue如何將值從一個jsp頁面轉移到第二個jsp頁面

這是我的代碼在第一頁:

<x:set select="title" var="titleValue" scope="session"/> 
<x:out select="$titleValue"/> 

回答

1

兩種方式:

  • 把它放在session。可訪問的throgh ${sessionScope.titleValue}
  • 將它作爲get參數傳遞(page.jsp?titleValue=something)。在這種情況下,它是與${param.titleValue}
+0

我嘗試這樣做訪問,但我看「titleValue」不是精確titleValue的值當我寫以下代碼: 2010-09-08 08:29:14

+0

將此添加到問題中,在此處無法讀取。 – Bozho 2010-09-08 10:14:49

相關問題