A servlet solution might work for this. If you use the <a></a> with
the target property, you could have the link hit the servlet and
redirect content into the new target window. Possibly, in order to
keep track of the window, you could assign an arbitrary ID or name to
each child window that is propagated through submits and anchors. Then
when the servlet processes the request, it will know what to do and
who is asking for it.
Do you need more control than this?