You have to use session.getVariable to initialize the said variable on a
different page. Also, can anyone verify that you can save arrays this
way?

Regards,
Pete Dolukhanov

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]] On Behalf Of Richard Diaz
Sent: 20 May 2002 21:35
To: [EMAIL PROTECTED]
Subject: showing a looping in JSP with arrays

in my JSP page I get a NULL POINTER EXCEPTION...

<%=MyBookmarkArray[1].getpk() %> </br>

I have verified there are 3 bookmarks created in my
servlet they are session variables using:
session.setAttribute("MyBookmarkArray[" + i + "]",
MyBookmarkArray[i]);

also I can see all my non array session variables just
not this array one... a scope problem?

it would be great if someone could point me to an
example of looping through an array and rendering it
in my jsp page.


Also, anyone know of a good JSP Forum? I need to also
figure out how to loop output of the above array
inside the JSP.

thanks in advance.
Rich


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

========================================================================
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to