File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes tomcat via java code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat via java code" Watch "tomcat via java code" New topic

tomcat via java code

fahad siddiqui
Ranch Hand

Joined: Jun 14, 2006
Posts: 85
I am creating an instance of tomcat via java code using the following snippet.

This uses the catlina jar.
My concern is, can i use this instance as a normal tomcat instance for deploying my war files?
I ran this and got an instance of tomcat running on 8080.
Now, i want some other program to deploy a war file on this running server. Is it possible? Because i am not able to.
Please advise on how to?

If i register a war in this class only right after starting the tomcat, it works, but can't i do this from some other class or something at a later point of time?

I use the following snippet for registering the war:
I agree. Here's the link:
subject: tomcat via java code
jQuery in Action, 3rd edition