tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: JSP in Static Resources
Date Mon, 15 Jul 2013 16:57:28 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Alireza,

On 7/13/13 6:13 AM, Alireza Fattahi wrote:
> I just find a bad work around which you must put <%@page 
> contentType="text/css" %>in top of all css files

Why don't you want to do this? This is actually the proper way to do
things. Perhaps you could split your CSS files into static and dynamic,
like this:

<servlet-mapping>
  <servlet-name>jsp</servlet-name>
  <url-pattern>/css/dynamic/*.css</url-pattern>
</servlet-mapping>

Now, you only need to put the <@page> directive in CSS files that are
actually dynamic.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJR5Cn3AAoJEBzwKT+lPKRYIo0P/3zQ/k49aqwapnwnjAIZlXZg
JgD9FH0bBKJVWca7wYY9Qn0ugr+8z2kTwcE1X8bKtvaiHyTJlzV70Y6Z9L2qNGcA
dPNPcrUnEO4K+8E4xGVjeJ5UnqSIa6xj4nqmRmiSEpEztTZVjXGlqzBFUrNO5Gob
rwxtZHD5WJL8NMsfKPROXVY47wSl7BH9JHd9A3etiYbPgMXNhLKTOA6zv330OVgo
DpDpoVQsPkiRisruVma8runc78My4dcWbB0oKA40x5AJNCU52KRvncsM7hJNqtas
Se3N04JB26XsPPelkqvfBlMIzIpV1Y6W4yDg1TQfosj6Mvg+Rk2vw0eXD0xoL94+
2GtAGN0peVNqx4QmBFXWDIQ7qpBDMjyrPQSZbUY3iUoSFuBC9oFMczayIJBThE4+
m8g8bbQunopDKPsqCU1Gv/4so9DIu9KO6D7k72DUoigsRnb+eyfEpeH8cqd63qrc
WS3Tuos08cw4p+uG2rLP3U3j8fzKCEarevjYa62VTynN613hA3ElgQl+wcP+QRvC
Qlhnz4V+wM4o8DuW0w/u5XzTbPerYMsE+1WxSL/wssIWLownbX/OweSITwgMD1r2
J32Q7fUoYV8ib2AUotSo957LkkE9D0BJi3edlytsgQoj01C/tnBztw6bN8zaaAvI
ezJ7aZNKYfxTCl/uFjBZ
=J4yg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message