How to use swagger-ui with service deployed in tomcat running on eclipse
rest, swagger, swagger-ui, tomcat, web-applications
Solution
Adding the Swagger dist directly to the webapps folder did the trick
Problem
I have a REST api running at `http://localhost:8080/MyService` and can see the JSON produced by swagger at `http://localhost:8080/MyService/api-docs`. In the Servers project in eclipse I have modified web.xml to include the Cors filter: ``` <filter> <filter-name>CorsFilter</filter-name> <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> </filter> <filter-mapping> <filter-name>CorsFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> ``` but when I point swagger-ui (loaded in browser from file system) at `http://localhost:8080/MyService/api-docs`, I get the following error: Can't read from server. It may not have the appropriate access-control-origin settings.