Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to get the value of ${requestScope.list[]} on the next servlet page in the below code?

Assume you have a jsp page and the code is <a href="servletclass">${requestScope.list[0]}</a> <a href="servletclass">${requestScope.list[1]}</a> <a href="servletclass">${requestScope.list[2]}</a>

user-image
Question added by himanshu mittal
Date Posted: 2013/08/31
Bassem Zohdy
by Bassem Zohdy , Senior Software Architect , HelpAG

If you want to share any values between2 pages, you have2 options, send it in a form in input field text or hidden or using any other form component and submit it

<form>

<a href="servletclass">${requestScope.list[0]}</a>

<input type="hidden" value="${requestScope.list[0]}"/>

...

<input type="submit"/>

</form>

or use the session of the user.

request.getsession().setAttribute()

and

request.getsession().getAttribute()

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.