Saturday, March 14, 2009

How can we access a Vector from one jsp page to another jsp page. You

Question :How can we access a Vector from one jsp page to another jsp page.? You
also need to restrict a third jsp page from having access to this
Vector. (JSP)


Answer :If you use session.setAttribute("key","value"); then the object that is put
into the session is available till the session is timed out. In this case
if you need to restrict the vector in third jsp page, put it in request scope
e.g. request.setAttribute("key", "value"); By this way your object
is available till your request has been processed.

No comments: