I like to keep the user preferences for that JSP web page (e.g. the number of rows per table) after periodic page refresh.
The solution need to work for multiple browsers on the same or different PCs.
Please note that the user preferences (e.g. the number of rows per table) for different tabs (pages) on the same browser may be different.
URL Parameter Passing is the only approach I can think of.
e.g. http://127.0.0.1:8080/datadisplay?page=1&rowsperpage=20 Are there other approaches?
Bear Bibeault wrote:Isn't that what databases are for?
If database is used, then each browser tab (JSP page) within the same browser will be assigned an unique page id. The user preferences for that page will store in the database with the page id as key.
How to differentiate each browser tab (JSP page) from other tabs within the same browser so as to assign an unique page id for each browser tab?
That's a data modeling issue that you'd need to solve.You could associated each distinct area that needs prefs by some unique name.
Joined: Feb 04, 2010
Bear Bibeault wrote:That's a data modeling issue that you'd need to solve.You could associated each distinct area that needs prefs by some unique name.
How about this?
The "database" can be implemented as JSP session at the server or as cookie at the client.
The following is my attempt to "Keeping user preferences for that page after periodic page refresh for multiple browsers / PC".
It is still work in progress and contains bugs.
I like to pass user input between two Controllers and display user input after submit.
The displayHw.jsp and displayHwController handles the user input.
It reads from the database and display the data.
It posts the write input to displayHwMgrController.
The displayHwMgrController writes to the database and redirects back to the displayHwController.
How to pass user input between two Controllers?
The user input disappear from the jsp page after the Apply button is clicked to submit the user input.
How to display the recently user input on the jsp page?