On 8/20/2010 9:23 AM, Caldarale, Charles R wrote:
From: Ranjith [mailto:ranjit...@sedin.co.in]
Subject: Re: How to convert WAR application into console application
(Making Unicorn has console application)

No not like that it runs very well in tomcat but i want to build a
console version I`m not hater of tomcat I just want to build it.

Perhaps you missed the irony of the question...

In any event, how do you propose to get input into the application and display 
its responses?  Anything packaged as a webapp will be expecting to use 
HTTP/HTML; how do you propose to handle that in a console application?  (It 
certainly can be done, but it's going to be a lot of work, and since we're all 
volunteers here, no one here is going to provide much assistance for this 
non-Tomcat situation.)

I went through this drill a couple of years ago when reports initially designed for display on the web had to be generated in plain text for ftp transfer. The refactoring was a fairly major job (I wasn't involved in the initial design), but once it was done, the time investment paid for itself several times over when other customers decided they wanted the same kind of thing.

I just send the output format as a parameter to the report generator, and the report generator returns a stream containing the report's data. Then the calling routine does whatever it needs to with the stream: if the calling routine was the webapp, it dumps the stream back out to the client's browser, and if it was the command-line front end, it dumps it to disk.

D

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

Reply via email to