title: Swagger UI Not Displaying Any Content On index.html Page
body: <p><strong>UPDATED with SOLUTION below!!!</strong><br>
  //////////////////////////////////////////////////////////////<br>
  Thanks to the advice of Ron below I slightly modified my setup to use BeanConfig instead of SwaggerConfig and got this working.  In order to do this I had to modify the servlet and also (and this is where I believe the missing piece was) add the BeanConfig entry into the spring application context file so that spring picks up the resources.  I included the updates below with comments in my code showing the old and new/updated code.  It's possible I could've continued with the SwaggerConfig (maybe I was just missing something in the spring application context file for that as well?) but the BeanConfig works so I'm going to leave it as is.<br>
  //////////////////////////////////////////////////////////////  </p>
  
  <p>I'm trying to get Swagger running with my local REST-based Java App and have made quite a bit of progress.  However, I seem to be missing something easy when I'm trying to get the Swagger UI working.</p>
  
  <p>Whenever I actually hit this address:  <a href="http://localhost:9082/mbl/index.html" rel="nofollow">http://localhost:9082/mbl/index.html</a> I'm getting the little green swagger header at the top but a blank white body with no content underneath.  Shouldn't I be seeing more than this in the body of the page?</p>
  
  <p>My stack is this:  Java 6 / Wink / Spring 3.1 / Jackson 2.5 / JAX-RS (JSR-311) and I'm using the following Swagger jars:  swagger-annotations-1.3.10.jar / swagger-core_2.10-1.3.10.jar / swagger-jaxrs_2.10-1.3.10.jar.</p>
  
  <p>Now I've managed to get some json displaying that looks like this when i hit <a href="http://localhost:9082/mbl/services/api-docs" rel="nofollow">http://localhost:9082/mbl/services/api-docs</a>:  </p>
  
  <pre><code>{"apiVersion":"1.0","swaggerVersion":"1.2","info":{"title":"Java API","description":"The following documentation contains the REST Service API useful for interacting with web services.","termsOfServiceUrl":"terms of service","contact":"email@test.com","license":"license type","licenseUrl":"license url"}}
  </code></pre>
  
  <p>I can see that this is being generated from my SwaggerServlet.java which looks like this:</p>
  
  <pre><code>package com.somewhere.mblsvc.web;
  
  import...
  
  public class SwaggerServlet extends HttpServlet {
  
      private static final long serialVersionUID = 1L;
  
      /* additional working code */
      BeanConfig beanConfig;
  
      public void setBeanConfig(BeanConfig beanConfig) {
          this.beanConfig = beanConfig;
      }
      /* end additional working code */    
  
      @Override
      public void init(ServletConfig servletConfig) {
          try {
          /* code from original post*/
          //  SwaggerConfig swaggerConfig = new SwaggerConfig();
          //  ConfigFactory.setConfig(swaggerConfig);
          //  swaggerConfig.setBasePath("/mbl/services");
          //  swaggerConfig.setApiVersion("1.0");
          //  swaggerConfig.setApiInfo(new ApiInfo("Java API", "The following //documentation contains the REST Service API useful for interacting with web //services.", "terms of service", "email@test.com", "license type", "license //url"));
          //  ScannerFactory.setScanner(new DefaultJaxrsScanner());
          //  ClassReaders.setReader(new DefaultJaxrsApiReader());
          /* end code from original post*/
  
          /* updated working code */
          beanConfig.setBasePath("/mbl/x-services");
          beanConfig.setVersion("1.0");
          beanConfig.setResourcePackage("com.somewhere.mblsvc.resources");
          beanConfig.setScan(true);
          /* end updated working code */
  
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  
  }
  </code></pre>
  
  <p>Also, I have the following in my spring application context xml file:</p>
  
  <pre><code>&lt;bean class="org.apache.wink.spring.Registrar"&gt;
      &lt;property name="classes"&gt;
          &lt;set value-type="java.lang.Class"&gt;
          &lt;/set&gt;
      &lt;/property&gt;
      &lt;property name="instances"&gt;
          &lt;set&gt;
              &lt;ref local="jaxbProvider" /&gt;
              &lt;ref local="apiDeclarationProvider" /&gt;
              &lt;ref local="apiListingResourceJson" /&gt;
              &lt;ref local="resourceListingProvider" /&gt;
          &lt;/set&gt;
      &lt;/property&gt;
  
  &lt;!-- Jackson Providers --&gt;
  &lt;bean id="jaxbProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider" &gt;
      &lt;property name="mapper" ref="jacksonObjectMapper"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jacksonObjectMapper" class="com.fasterxml.jackson.databind.ObjectMapper" &gt;
      &lt;property name="annotationIntrospector" ref="jacksonAnnotationIntrospector" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jacksonAnnotationIntrospector" class="com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair" &gt;
      &lt;constructor-arg ref="primaryAnnotationIntrospector" /&gt;
      &lt;constructor-arg ref="secondaryAnnotationIntrospector" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="primaryAnnotationIntrospector" class="com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector" /&gt;
  &lt;bean id="secondaryAnnotationIntrospector" class="com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector" /&gt;
  
  &lt;!-- Swagger Configuration and Providers --&gt;
  
  &lt;!-- additional working code --&gt;
  &lt;bean id="beanConfig" class="com.wordnik.swagger.jaxrs.config.BeanConfig"&gt;
      &lt;property name="title" value="Java API"/&gt;
      &lt;property name="version" value="1.0" /&gt;
      &lt;property name="basePath" value="/mbl/services"/&gt;
      &lt;property name="resourcePackage" value="com.somewhere.mblsvc.resources"/&gt;
      &lt;property name="scan" value="true"/&gt;
  &lt;/bean&gt;
  &lt;!-- end additional working code --&gt;
  
  &lt;bean id="apiDeclarationProvider" class="com.wordnik.swagger.jaxrs.listing.ApiDeclarationProvider" /&gt;
  &lt;bean id="apiListingResourceJson" class="com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON" /&gt;
  &lt;bean id="resourceListingProvider" class="com.wordnik.swagger.jaxrs.listing.ResourceListingProvider" /&gt;
  </code></pre>
  
  <p>My web.xml looks like this:</p>
  
  <pre><code>&lt;!-- REST servlet that dispatches to the App (resource class). Remove Init params entry containing application file --&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;Wink Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.apache.wink.server.internal.servlet.RestServlet&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Wink Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;!-- Enabling Swagger servlet --&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;Swagger Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.somewhere.mblsvc.web.SwaggerServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;-1&lt;/load-on-startup&gt; 
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Swagger Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/api-docs&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>Here's a snippet of my Resource class:</p>
  
  <pre><code>@Path("test")
  @Api(value ="test", description="Test Services")
  @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
  @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
  public class TestResource {
  
  .
  .
  .
  
      @GET
      @Path("testInfo")
      @ApiParam(defaultValue="you would put test case input here for a post")  
      @ApiOperation(value="Composite service returning extensive test information", response=com.somewhere.mblsvc.messages.test.testinfo.pojo.UserResponseMessage.class)
      @ApiResponses(value={
              @ApiResponse(code=200, message="OK"),
              @ApiResponse(code=500, message="Internal Error")
      })
      @JsonSerialize(include=JsonSerialize.Inclusion.ALWAYS)
      public Response getTestInfo(@Context HttpHeaders headers, 
              @CookieParam(value = "testBrand") String testBrand) {
  .
  .
  .
  </code></pre>
  
  <p>And, finally, the only important part of my index.html (that I can tell) looks like this:</p>
  
  <pre><code>  &lt;script type="text/javascript"&gt;
      $(function () {
        var url = window.location.search.match(/url=([^&amp;]+)/);
        if (url &amp;&amp; url.length &gt; 1) {
          url = url[1];
        } else {
          url = "http://" + window.location.hostname + (window.location.port ? ':'+ window.location.port: '') + "/mbl/services/api-docs";
        }
        .
        .
        .
  </code></pre>
  
  <p>I will <em>gladly</em> supply any more information as needed.  Does anyone have any idea what I might be missing?</p>
  
  <p>Thanks a lot!</p>