Welcome, Guest
Username: Password: Remember me

TOPIC: Running Limesurvey on Tomcat 6 - nearly there but having CSS woes

Running Limesurvey on Tomcat 6 - nearly there but having CSS woes 3 years 1 month ago #62172

  • wabrit
  • wabrit's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
I'm trying to run limesurvey 1.91+ on Tomcat 6, on a Windows 7 box.

It's almost there, and I can log into the application at the http://localhost:8080/limesurvey/admin, but it appears that the styles (the .css files) are not getting interpreted correctly as the page is missing any styling. If I look at the page in the chrome developer tool I can see a number of errors of the form:
Resource interpreted as Stylesheet but transferred with MIME type text/html. - localhost:8080/limesurvey/admin/styles/default/adminstyle.css

It's clear that the .css files are being retrieved (I can open them in the browser standalone) but with the wrong MIME attribution I don't think the browser is interpreting them correctly.

Would anyone be able to shed any light on why this might be happening and how to solve it? At first I thought it might be because I had switched ports to 8080, but the URLs look ok.
Last Edit: 3 years 1 month ago by wabrit.
The administrator has disabled public write access.

Re: Running Limesurvey on Tomcat 6 - nearly there but having CSS woes 3 years 1 month ago #62176

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1061
  • Thank you received: 234
  • Karma: 74
HI,

In your (root of your LS instalation) .htaccess file try to add:
AddType text/css .css
... and check ! It should fix your MIME type issue...

Ben
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Last Edit: 3 years 1 month ago by Ben_V.
The administrator has disabled public write access.

Re: Running Limesurvey on Tomcat 6 - nearly there but having CSS woes 3 years 1 month ago #62192

  • wabrit
  • wabrit's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
Hi Ben

Thanks for the suggestion - tried that but Content-Type:text/html is still being set for returned .css files.

limesurvey is working fine under apache (without any need for .htaccess mods) but for some reason is not working under tomcat.

Tomcat conf\web.xml already has a rule for mime-mapping:
<mime-mapping>
        <extension>css</extension>
        <mime-type>text/css</mime-type>
    </mime-mapping>

So I'm at a loss to understand why I still see text/html. Must be something to do with the operation of the Java PHP bridge I guess.
The administrator has disabled public write access.

Re: Running Limesurvey on Tomcat 6 - nearly there but having CSS woes 3 years 1 month ago #62200

  • wabrit
  • wabrit's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
Solved - it was indeed something to do with the operation of the Java PHP bridge. I changed my WEB-INF\web.xml from
<servlet-mapping>
 <servlet-name>PhpCGIServlet</servlet-name>
 <url-pattern>/</url-pattern>
</servlet-mapping>

to
<servlet-mapping>
 <servlet-name>PhpCGIServlet</servlet-name>
 <url-pattern>*.php</url-pattern>
</servlet-mapping>

and it all started working fine.
Last Edit: 3 years 1 month ago by wabrit.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.367 seconds
Donation Image