Front end technology that works for both Mobile and Web
<p>I'm building and application that has the backend in j2ee (ejb, hibernate, mysql). The web application front end was initially designed to be in jsf (primefaces) with backing beans.</p>

<p>Also, it has been decided to use cordove / html5 pages in he future for the mobile app.</p>

<p>I'm very new to this and have a couple of questions in reusing the code for both web and mobile app and integration of these different technologies. Instead of developing separately for the mobile</p>

<ol>
<li>If I use pure html5 / javascript can the same page be used in the web application as well as the codova mobile app. </li>
<li>If so, What about the normal backing bean logic. Where do I put that now? Can the backing bean be accessed by the cordova html5 page? Also jsf binding, How do I receive data in the web page</li>
<li>Is javascript the only way to access the rest webservices? Will I be accessing these from the web app as well as the mobile</li>
<li>All in all, does developing with cordova html5 / js / css means staying away from jsf 100%. And this means no access to jsf components or frameworks like primefaces. Is there anything else to replace these technologies to be compatible for both</li>
</ol>