add primefaces mobile to project
<p>i made this jsf page with primefaces 5.2 and it works</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pm="http://primefaces.org/mobile"&gt;

&lt;f:view renderKitId="PRIMEFACES_MOBILE" /&gt;

&lt;h:head&gt;

&lt;/h:head&gt;

&lt;h:body&gt;

    &lt;pm:page id="first"&gt;
        &lt;pm:header title="Page 1"&gt;&lt;/pm:header&gt;

        &lt;pm:content&gt;
            &lt;p&gt;Multiple pages&lt;/p&gt;

            &lt;h:form&gt;
                &lt;p:button outcome="pm:second?transition=flip" value="Go Button" /&gt;
            &lt;/h:form&gt;
        &lt;/pm:content&gt;


    &lt;/pm:page&gt;

    &lt;pm:page id="second"&gt;
        &lt;pm:header title="Page 2"&gt;&lt;/pm:header&gt;

        &lt;pm:content&gt;
            &lt;p&gt;Page 2 content.&lt;/p&gt;
        &lt;/pm:content&gt;

        &lt;h:form&gt;
            &lt;p:button outcome="pm:first?transition=slidefade" value="Go Button" /&gt;
        &lt;/h:form&gt;
    &lt;/pm:page&gt;

&lt;/h:body&gt;

&lt;/html&gt;
</code></pre>

<p>primefaces version on my project is 4 and i cant change it, Apparently it hasnt mobile version on it</p>

<p>so i downloaded primefaces mobile from <a href="http://grepcode.com/snapshot/repository.primefaces.org/org.primefaces/primefaces-mobile/1.0.0-SNAPSHOT" rel="nofollow">here</a> and added to project,but i get this error </p>

<pre><code>SEVERE: Error Rendering View[/hl/nursing/patientdocserviceform.xhtml]
java.lang.NullPointerException
at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:184)
    at com.sun.faces.application.view.WriteBehindStateWriter.write(WriteBehindStateWriter.java:127)
    at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.write(HtmlResponseWriter.java:717)
    at org.primefaces.mobile.component.page.PageRenderer.encodeBegin(PageRenderer.java:64)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:864)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1894)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1899)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1899)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:451)
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:70)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.omnifaces.facesviews.FacesViewsForwardingFilter.doFilter(FacesViewsForwardingFilter.java:121)
    at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:75)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
</code></pre>

<p>i added code to faces-config,changed mobile version but none of them didnt work
what am i doing wrong?</p>