Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] SoapUI Jetty incorrect content-type for css

The DefaultServlet that jetty provides handles the transfer of common static files.
It has been well tested for mime types.

However, it is very common for 3rd party libraries to override this behavior.
Since you didn't say if this was standalone or embedded, i'll just assume standalone.
What to check:
  1. Make sure you have a web.xml (required for your version of the servlet spec)
  2. Make sure you are doing standard deployments (otherwise you are not wired up for standard servlet behavior)
  3. Make sure your distribution has a etc/webdefault.xml (otherwise you have nothing defining a default servlet)
  4. Make sure that the servlet named 'default' points to the jetty default servlet (otherwise you don't have a default servlet)
  5. Make sure that you don't override the default "/" mapping with your own servlet (otherwise you are not using jetty to serve that css file)
  6. Make sure you don't map to "/*" with your own servlet (otherwise you are not using jetty to serve that css file)
Btw, There have been over 100 releases of Jetty since version 6.1.24, you should upgrade.

Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Wed, Nov 6, 2013 at 1:14 PM, Christopher Melen <relativeflux@xxxxxxxxxxxxx> wrote:

I am serving Swagger UI from the static content directory of my mock REST API in SoapUI. SoapUI uses jetty-6.1.26.jar and jetty-util-6.1.26.jar. Unfortunately the Swagger css files are being served as application/x-pointplus, which both Opera and Firefox refuse to handle (haven't tried any other browsers).

The html file referencing the css has the type correctly set to "text/css".

I initially posted about this on the SoapUI forum, but was directed here instead. Is this really a Jetty problem, and if so what might be the solution be?

Thanks for any help,

jetty-users mailing list

Back to the top