Hi Shirish,
The purpose behind SiteMesh and with most parsers in general is to work with well formed and syntactically valid html/xml. If you are not already familiar, the
W3C is a good place to learn about this.
As such at least with SiteMesh 2 and most likely with SiteMesh 3 there are no configurations to handle a scenario where an html page has two body tags. You can certainly extend SiteMesh as danielbodart pointed out.
I will add to danielbodart's answer with two more suggestions,
A)
When composing with FreeMarker, compose valid html. I am not sure how you are combining the two html files, but that is where I would make adjustments.
B)
If you are using servlets add your own filter before SiteMesh to combine the content of the two body and head tags into one.
Good luck and we would like to hear what you end up doing.