Well the following could be done :
At the beginning of your JSP page, retrieve the array from the session
object calling the getAttribute method after that use an if statement to
check whether the array object returned with the above method call is null
or if the size of the array is zero.
If it is stop processing the current jsp page and either forward / redirect
to your other page.
Assume it helps :-).
Have a nice day.
With regards,
Sachin S. Khanna
http://www.emailanorder.com
----- Original Message -----
From: Martie Parten <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 02, 2001 12:02 AM
Subject: conditional forwarding from within a jsp page


> In the app I'm working on, there is supposed to be an
> array of objects containing some information that I
> need to display on the jsp. This array is stored in
> the session (an HttpSession). Before using any of the
> objects and their methods, I'm checking to see if the
> array in the session is null or zero length. If so,
> then I don't have the data and shouldn't display the
> page. What is the best way to handle this and display
> an alternate page?
>
> Any suggestions welcomed, and thanks in advance for
> your input.
>
> Martie
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.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://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
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://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to