开发者

How to convert WAR application into console application (Making Unicorn has console application)

Unicorn just provide a URI and push the button. It will call a series of validation services and report the results.I have already downloaded and installed Unicorn. To Download the source code it is only available for download from the Mercurial repository. To download it, use the command "hg clone https://dvcs.w3.org/hg/unicorn"

To compile Unicorn, Apache Ant and Ivy are required. From Unicorn's directory, run: "ant retrieve generate_observer ge开发者_开发百科nerate_tasklist default_conf war"

It works fine in apache-tomcat, what I want is how to make the unicorn as console application. The input should passed through command line arguments and output should displayed at console itself I don`t want to use any web server to deploy it.


Make your war a runnable jar too. Just requires adding a Class-Path entry to the Manifest and having a static main(...) to invoke.

Have a look at Hudson which is distributed in a WAR-file which can be invoked with "java -jar" to bootstrap itself.


I'd say that you have a major programming exercise on your hands. A typical web-based application and a typical console based application are structured very differently. Even the output format is different; i.e. HTML markup versus plain text.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜