Hey Guys,
Should i use hidden textboxes or session variables to pass values between various jsp pages??

Recommended Answers

All 3 Replies

Sessions as they been designed for this task

Member Avatar for kvamsij

Hey Guys,
Should i use hidden textboxes or session variables to pass values between various jsp pages??

u can use them but if u want ur code look like professional then y dont you use <jsp:include page="file_name"/> using this u can use the paramers or vairable which can be used in the other jsp to another jsp.

Normally you'd use a combination of the two, depending on what is needed.
There is even a school of thought that advocates against the use of http sessions, says that everything should be either passed through the page, through cookies, or persisted in between requests (database for example).
While that's extreme, limiting what's stored in the session can be critical in high load applications as the session does eat up server memory.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.