The disqus_identifier
and disqus_url
parameters are not required for Disqus to embed. However, depending on the functionality you are looking for (which is not clear from your question) you may need them to satisfy your requirements.
Since your page is composed of widgets, I assume there is no "permalink" URL that links to just the Disqus widget. For that reason, I would recommend you do not set the disqus_url
parameter at all. (By not setting this parameter, disqus will figure out the appropriate URL on its own.)
The method you use to set the disqus_identifier
will determine how and when a new disqus thread appears in the widget. If you want each user to see a unique disqus thread in their widget, set disqus_identifier
to that user's ID. In JSP, this might look something like the following (but the actual implementation completely depends on your unique application).
// ...
%>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'example'; // required: replace example with your forum shortname
// The following are highly recommended additional parameters. Remove the slashes in front to use.
var disqus_identifier = '<%=currentUser.getID()%>';
// var disqus_url = 'http://example.com/permalink-to-page.html';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<%