Second option does not look very good for me. What we use on our project is that we have base template that is extended by ajax parts and these parts have something like this to not load rest of the template on ajax request:
#{ifnot request.ajax}
#{extends 'search-main.html' /}
#{/ifnot}
and search-main.html
has #{doLayout /}
in place where ajax section should occur if full page is going to be rendered (non ajax request). Value in request.ajax
will be set by Play, so you don't have to figure it out yourself.
About duplicated controllers: you should be able to map one controller to many urls if needed. Just add them to routes
file. But it is not required in our approach.