Hi li bei
So if I understand it correctly your 3 chips require to show something which needs to access the DB. Now as known writing DB access logic in jsp is not a very good practice. Also what I feel is that you have created these chips because showing new members in the current club, showing the new songs shared and showing the new pictures uploaded, are part of almost all the JSPs.
In my opinion the solution will require the following three things to be done
What you can do is put this logic of fetching the data for these 3 chips in a POJO which will be either be called from all the actions or you can device a post processing filter for doing this.
Once the data is received from the POJO put the data into 3 different objects (device the classes for these objects as per the properties required to be shown on the front end, this class will basically be a bean) and embed these beans in the request (by the action class or filter as you plan to do it).
And finally on the presentation layer modify your chips to (using JSTL or
struts tags) extract these embedded objects from the requests and display the properties as you require.
let me know if this helps or if you have more queries
cheers!
mohit