简体   繁体   中英

How do I pass a value throughout my project and use it anywhere in the program

How do I pass a value throughout my project and use it anywhere in the program. .. The value is selected before the login page... I want to access it anytime and in any jsp or servelet in a project

You can use HttpSession to do the same.

Other than this you can initialize context parameters.

Follow this link for parameters approach.

init-param and context-param

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM