Passage de tableau à deux dimensions dans une session
Bonjour,
J'ai un souci avec mon code jsp pour passer un tableau à 2 dim dans ma session.
Je veux traiter ce tableau dans une servlet derrière, mais je n'arrive pas à le passer...
D'ailleurs, quoique je veuille passer, ca ne passe pas :?
Voici le code jsp:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| var dataGraphiques = ( new BVI_GenericDBManager())
.contentByCachedQuery
(
sql="select DATEPC, NOTE_ANALYSTES, TOTAL_ANALYSTES"+
"from consensus " +
"where code_isin = 'FR0000133308'" +
"and rownum < 13" +
"order by datePC desc"
,0
);
var tabDatasGraphiques = [];
if ( dataGraphiques && ( dataGraphiques.rows > 0 ) ) {
for( dataGraphiques.cursor = 0; dataGraphiques.cursor < dataGraphiques.rows; dataGraphiques.cursor++ ){
tabDatasGraphiques[tabDatasGraphiques.cursor] = {
"date" : getMonth(dataGraphiques.datePC),
"note" : dataGraphiques.NOTE_ANALYSTES,
"nbAnalystes" : dataGraphiques.TOTAL_ANALYSTES
};
}
}
Session.tabNotes = tabDatasGraphiques; |
La ligne suivant ce code, j'ai fait ceci:
Code:
Session.testNico = "blablabla";
Dans ma servlet, je fais le traitement suivant:
Code:
1 2 3 4 5 6
| protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
BVLog.bvlog(1,1,"================= TEST DO GET =====================");
HttpSession session = request.getSession(true);
String[][] notes = (String[][]) session.getAttribute("tabNotes");
String test = (String)session.getAttribute("testNico");
BVLog.bvlog(1,1,"====" + test + "====="); |
Et le résultat dans les logs java est le suivant:
Citation:
on Nov 27 11:57:50 2006 (1164625070.667347) bvsmgr_nopure[27613]@DFS11:<13.1247082459>:L1:S18 Reporting Code: 10001 Reason: BVI_Session___addPropertyStub: type index for new value not found
JavaScript stack:
[1] line 221 in "/export/home/fortuneo/devfortuneo/script_pages/dev5/WebBank/scripts/FRT5.2/lesMarches/historiqueConsensus.jsp"
Mon Nov 27 11:57:50 2006 (1164625070.997844) bvsmgr_nopure[27613]@DFS11:<12.1006540100>:L1:S01 ================= TEST DO GET =====================
Mon Nov 27 11:57:50 2006 (1164625070.998800) bvsmgr_nopure[27613]@DFS11:<12.1006540100>:L1:S01 ====null=====
Bref, je ne sais pas trop quoi faire, j'ai testé que mes éléments sont bien non null...