code: public boolean viewExists(FacesContext context, 
                                String viewId) {
          boolean result = false;
          ResourceHandler rh = context.getApplication().getResourceHandler();
          result = null != rh.createViewResource(context, viewId);
  
          return result;
      }
docs: <p class="changed_added_2_1"><span class="changed_modified_2_2">Tests</span>
  whether a physical resource
  corresponding to the specified viewId exists.</p>
  
  <p class="changed_modified_2_2">The default implementation uses
  {@link javax.faces.application.ResourceHandler#createViewResource}
  to locate the physical resource.</p>
  
  @param context The <code>FacesContext</code> for this request.
  @param viewId the view id to test
  
  @since 2.1