Note: Due to lack of resources to maintain the Unicorn project, W3C stopped providing this on-line service as of 31 March 2023. (See 2023-02-15 W3C Homepage news)
Since there is no resources from W3C nor the community supporting this project at present, we encourage people to fork.
Unicorn is W3C's unified validator, which helps people improve the quality of their Web pages by performing a variety of checks. Unicorn gathers the results of the popular HTML and CSS validators, as well as other useful services.
This site addresses these audiences:
unicorn.home
parameter to your JVM parameters, pointing to the unicorn root directory.example :
Dunicorn.home=/var/lib/tomcat6/webapps/unicorn/
or Dunicorn.home=/C:/Program%20Files/Tomcat/webapps/unicorn/
(read your servlet engine documentation to know how to add this parameter)
WEB-INF/conf
.unicorn properties
, which contains some properties that you may want to change:
UNICORN_URL
is the URL of your installation of Unicorn.DEFAULT_LANGUAGE
, the language Unicorn will use if language negotiation fails.UNICORN_HOME
, which is equal to the JVM parameter unicorn.home
.velocity.properties
contains properties for the template engine that Unicorn uses: Apache Velocity
parser.pool.size
is set to the default velocity value (20). If you have a lot of requests you may have to increase this value. In any case check the logs to see if you need to change it (Velocity will log warnings).log4j.properties
is the properties file for Apache Log4j. The property UNICORN_HOME
is also available in this file. By default logs will be written in WEB-INF/logs
and sorted by package and level.
java.util.Logger
will be used.WEB-INF/resources/tasklist
you will find the task related files which are xml files describing tasks and rdf files containing metadata about tasks.build.xml
for more info.ex: ant war
Note that this file is very important because it will give permissions to read and write files under Unicorn servlet dir, but also to connect to distant hosts (observers).
Once you have compiled and deploy Unicorn on your engine you must initialize it. There are a few mandatory steps that Unicorn has to do before being usable, like parsing the contract files, language files, taklists, etc...
If your engine uses the web.xml
description file (which should be the case with almost any servlet engine) initialization is automated at startup.
If you want to manually initialize Unicorn you can simply execute the InitAction by connecting to http://localhost:8080/unicorn/init. This task will launch all initialization tasks which are:
In a production environment InitAction servlet should be protected to be accessible only from localhost (set PROTECT_INIT_ACTION to true in unicorn.properties)
Under Tomcat logs files are on "webapps/unicorn/WEB-INF/logs/"
.
There are split in two directory :