Help coderanch get a
new server
by contributing to the fundraiser

Bear Bibeault

Sheriff
+ Follow
since Jan 10, 2002
Merit badge: grant badges
Forum Moderator
Bear Bibeault currently moderates these forums:
Biography
Author of:
Secrets of the JavaScript Ninja, 1st and 2nd editions,
jQuery in Action, 1st, 2nd and 3rd editions,
Ajax in Practice, and
Prototype and Scriptaculous in Action
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Bear Bibeault

You can view your local storage in DevTools to see if your set to local storage is working and the value is what you expect. If not, debug how you are setting the value. If so, then it's your local storage fetch that's the issue.

Be aware that all local storage is stored as strings; so if you are trying to store complex structures they need to be serialized. JSON is the usually technique for that.
DropBox may be an option.
2 months ago
Use the debugger or console.log to see what each factor in your conditional expressions equates to individually. Make sure that they are all as you expect.

Also, prefer !== and === in comparisons. That way you get xact comparisons without coersions.
Because you want to return data, not a view, you would not use ModelAndView, you'd return an appropriate ResponseEntity, and mark the controller with @RestController.
5 months ago
Two things:

1. When using regular expressions, it's best to use RE literals versus strings when you can. That way you get syntax checking, and avoid string escaping woes.

2. \s

So:
Then you would use <c:forEach> to iterate over your data.
7 months ago
JSP
That depends on what tag library you are using. It will likely have tags for looping over a list or array of data.
I revised my post. You'd need to loop through your list and create an option element for each choice.
Your HTML for the select element should contain only options elements, and optionally optgroup and hr elements.
P.S. If you want to get fancy with CSS and are targeting only modern browsers, here's an article that might be helpful.
HTML select elements are largely un-stylable. What are you trying to achieve?