I have around 90 menus each having at least 4 screens representing CRUD actions. Out of these, 13 menus have baltic character support & others don't. But still plenty of user's input baltic characters in those 87 menus due to which garbage data is being populated at Back end. BE is a different team and they can't accommodate changes atm, due to which I have to handle it at Front end.
I am looking for a generic solution, so I just write a method & reuse everywhere else.
The Generic solution I have decided is to iterate the request bean object & through reflection iterate over its methods & check each value for Baltic characters.
Another solution I had is to iterate HttpServlet request parameters & check them for baltic character presence.
I am using Struts2 and java 7. I wanted to know which of the above two options would be better to go with. I am aware that reflection comes with performance caveats. But I feel its a better approach then httpservlet request parameters.
If there is any other solution, request you to please share your idea/suggestion.
EDIT: For some menus, in our application, we have used jsp-servlet architecture, the same needs to be implemented in these kinds of menus as well.