How can I generate dynamic meta tags for facebook on server side? Depending upon the data fetched from database, I need to dynamically set the value of og:title, og:description etc.
Can I use HttpServletResponse.addHeaders() to do that? If yes then how to do that?
In JSF, you can just use EL in template text.
<meta property="og:title" content="#{bean.og.title}" />
<meta property="og:description" content="#{bean.og.description}" />
<meta property="og:url" content="#{bean.og.url}" />
...
Bean and model can be prepared and used the usual way here.