1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Download and Install the CSS Validator</title>
<link rev="made" href="mailto:www-validator-css@w3.org" />
<link rev="start" href="./" title="Home Page" />
<style type="text/css" media="all">
@import "style/base.css";
@import "style/docs.css";
</style>
<meta name="revision"
content="$Id$" />
<!-- SSI Template Version: $Id$ -->
</head>
<body>
<div id="banner">
<h1 id="title"><a href="https://www.debian.org/"><img alt="Debian" width="110" height="61" id="logo" src="images/openlogo-nd.svg" /></a>
<a href="./"><span>CSS Validation Service</span></a></h1>
<p id="tagline">
Check Cascading Style Sheets (CSS) and (X)HTML documents with style sheets
</p>
</div>
<div class="doc">
<h2>Download and Install the CSS Validator</h2>
<h3 id="download">Download the CSS Validator</h3>
<p>The CSS validator is available in three different packaging: from Git for developers who want the very latest version,
as a jar archive to build applications and for use as a command line tool, and (since 2009) as a war archive for server-side
applications.</p>
<h4 id="source">Download the source code</h4>
<p>The <a href="https://github.com/w3c/css-validator">source of the CSS Validator</a> can be retrieved with Git.
Please note that the online service for the CSS validator is a stable release,
generally a little older than the version under Git, and their results and behaviour may differ.</p>
<h4>Download the Java archive (jar)</h4>
<p><a href="http://www.w3.org/QA/Tools/css-validator/css-validator.jar">css-validator.jar</a></p>
<h3>Installation Guide</h3>
<p>The CSS Validation service is based on a servlet written in the cross-platform Java language, and can
be installed on any servlet platform. While the official service from W3C runs under the Jigsaw server
(which is the recommended setup), we will for the sake of convenience describe in this guide the setup
under Apache's servlet engine, Tomcat, as well as some quick instructions for Jigsaw and commandline usage.</p>
<h4 id="prereq">Prerequisites</h4>
<p>This guide assumes that you have already downloaded and installed successfully the following:</p>
<ul class="instructions">
<li>a working java environment ;</li>
<li>the <a href="http://ant.apache.org/">Ant</a> java build tool ;</li>
<li>a Java servlet container such as <a href="http://www.w3.org/Jigsaw/">Jigsaw</a>,
<a href="http://tomcat.apache.org/">Tomcat</a> or <a href="http://www.mortbay.org/">Jetty</a>, if you plan to provide the validator as a web service.</li>
</ul>
<p id="prereq-libs">
As a prerequisite to the installation, you will need to know the complete path to the java library called <span class="file">servlet.jar</span>.
It is generally available within <span class="dir">[<span class="const">TOMCAT_DIR</span>]/common/lib/</span>, with <span class="dir">[<span class="const">TOMCAT_DIR</span>]</span> being the path under which Tomcat is installed. It may also be found under the name servlet-api.jar. If you can not
find it, <a href="http://java.sun.com/products/servlet/DOWNLOAD.html">java.sun.com</a> will have it.
</p>
<h4>Installation of the CSS validator under Tomcat</h4>
<ol class="instructions">
<li>Download the Git source as explained <a href="#source">above</a> ;</li>
<li>Edit the file called <span class="file">[<span class="const">VALIDATOR_DIR</span>]build.xml</span> and replace the value of
property servlet.lib with the full path to <span class="file">servlet.jar</span>
</li>
<li>
You can now build the source : from <span class="dir">[<span class="const">VALIDATOR_DIR</span>run the command <kbd>ant war</kbd>.
Running ant should download a number of necessary libraries, and build the archive called <span class="file">css-validator.war</span>.
</li>
<li>
Copy or move <span class="file">css-validator.war</span> to <span class="dir">[<span class="const">TOMCAT_DIR</span>]/webapps</span>.
<li>Finally, restart the Tomcat engine :<br />
<kbd>"cd <span class="dir">[<span class="const">TOMCAT_DIR</span>]</span>; <span class="dir">./bin/</span><span class="file">shutdown.sh</span>; <span class="dir">./bin/</span><span class="file">startup.sh</span>;"</kbd>
</li>
</ol>
<h4>Installation of the CSS validator under Jigsaw</h4>
<ol class="instructions">
<li>Download the Git source as explained previously, save it under <span class="dir">[<span class="const">JIGSAW_DIR</span>]/WWW</span>
and build source with <kbd>ant jigsaw</kbd> ;
</li>
<li>Next, configure the root folder for the validator (in most cases it will be called css-validator) to make it a servlet container.
Within your Jigsaw installation, launch the Jigsaw Admin utility, browse to <code>css-validator</code> and change it from HTTPFrame to ServletDirectoryFrame ;</li>
<li>The next step will be to create a "validator" resource as 'ServletWrapper' class. A 'ServletWrapperFrame' frame will automagically
be created for it. You will need to provide the name of the servlet class, which for the CSS Validator os org.w3c.css.servlet.CssValidator.
Note that a file called “validator” may already be present – you MUST rename it, as the validator absolutely needs to enforce this name for the servlet wrapper ;</li>
<li>Make sure that all the .jar libraries within the <span class="dir">[<span class="const">JIGSAW_DIR</span>]/WWW/css-validator/lib</span> folder
are properly added to Jigsaw's CLASSPATH setup.</li>
<li>Finally, restart Jigsaw and point your browser to the validator. The URI should be something like :<br />
http://localhost:8001/css-validator/validator.html</li>
</ol>
<h3>Command-Line use</h3>
<p>Any computer with Java installed can also run the validator from the terminal/console as a commandline tool.
Download the css-validator.jar jar archive (or build it with <kbd>ant jar</kbd>) and run it as :<br />
<kbd>java -jar css-validator.jar http://www.w3.org/</kbd>.
</p>
</div>
<ul class="navbar" id="menu">
<li><strong><a href="./" title="Home page for the W3C CSS Validation Service">Home</a></strong> <span class="hideme">|</span></li>
<li><a href="about.html" title="About this service">About</a> <span class="hideme">|</span></li>
<li><a href="documentation.html" title="Documentation for the W3C CSS Validation Service">Documentation</a> <span class="hideme">|</span></li>
<li><a href="Email.html" title="How to provide feedback on this service">Feedback</a> <span class="hideme">|</span></li>
<li><a href="thanks.html" title="Credits and Acknowlegments">Credits</a><span class="hideme">|</span></li>
</ul>
<ul id="lang_choice">
<li><a href="DOWNLOAD.html.bg"
lang="bg"
xml:lang="bg"
hreflang="bg"
rel="alternate">Български</a></li>
<li><a href="DOWNLOAD.html.de"
lang="de"
xml:lang="de"
hreflang="de"
rel="alternate">Deutsch</a>
</li>
<li><a href="DOWNLOAD.html.en"
lang="en"
xml:lang="en"
hreflang="en"
rel="alternate">English</a>
</li>
<li><a href="DOWNLOAD.html.es"
lang="es"
xml:lang="es"
hreflang="es"
rel="alternate">Español</a>
</li>
<li><a href="DOWNLOAD.html.fr"
lang="fr"
xml:lang="fr"
hreflang="fr"
rel="alternate">Français</a>
</li>
<li><a href="DOWNLOAD.html.ko"
lang="ko"
xml:lang="ko"
hreflang="ko"
rel="alternate">한국어</a>
</li>
<li><a href="DOWNLOAD.html.it"
lang="it"
xml:lang="it"
hreflang="it"
rel="alternate">Italiano</a>
</li>
<li><a href="DOWNLOAD.html.nl"
lang="nl"
xml:lang="nl"
hreflang="nl"
rel="alternate">Nederlands</a>
</li>
<li><a href="DOWNLOAD.html.ja"
lang="ja"
xml:lang="ja"
hreflang="ja"
rel="alternate">日本語</a>
</li>
<li><a href="DOWNLOAD.html.pl-PL"
lang="pl-PL"
xml:lang="pl-PL"
hreflang="pl-PL"
rel="alternate">Polski</a>
</li>
<li><a href="DOWNLOAD.html.pt-BR"
lang="pt-BR"
xml:lang="pt-BR"
hreflang="pt-BR"
rel="alternate">Português</a>
</li>
<li><a href="DOWNLOAD.html.ru"
lang="ru"
xml:lang="ru"
hreflang="ru"
rel="alternate">Русский</a>
</li>
<li><a href="DOWNLOAD.html.sv"
lang="sv"
xml:lang="sv"
hreflang="sv"
rel="alternate">Svenska</a>
</li>
<li><a href="DOWNLOAD.html.zh-cn"
lang="zh-cn"
xml:lang="zh-cn"
hreflang="zh-cn"
rel="alternate">简体中文</a>
</li>
</ul>
<div id="footer">
<p id="activity_logos">
<a href="http://www.w3.org/QA/" title="W3C's Quality Assurance Activity, bringing you free Web quality tools and more"><img src="data:," alt="QA" /></a><a href="http://www.w3.org/Style/CSS/learning" title="Learn more about Cascading Style Sheets"><img src="images/woolly-icon" alt="CSS" /></a>
</p>
<p id="support_logo">
<a href="http://www.w3.org/QA/Tools/Donate">
<img src="data:," alt="I heart Validator logo" title=" Validators Donation Program" />
</a>
</p>
<p class="copyright">
<a rel="Copyright" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1994-2009
<a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a>®
(<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>,
<a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
<a href="http://www.keio.ac.jp/">Keio</a>),
All Rights Reserved.
W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>,
<a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
and <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a>
rules apply. Your interactions with this site are in accordance
with our <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Public">public</a> and
<a href="http://www.w3.org/Consortium/Legal/privacy-statement#Members">Member</a> privacy
statements.
</p>
</div>
</body>
</html>
|