tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin" <mgai...@hotmail.com>
Subject Re: How to run own java application within Tomcat
Date Tue, 03 Jun 2008 20:31:50 GMT
Slobodanka-

if you want to dynamically create and access TC entities (engines,connectors 
etc) from outside TC environment
you would need to implement TC embedded server
http://www.vsj.co.uk/articles/display.asp?id=319

HTH
Martin
----- Original Message ----- 
From: "Slobodanka Dimitrijevic" <sdimitrijevic@dirkzwager.com>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Tuesday, June 03, 2008 4:18 PM
Subject: RE: How to run own java application within Tomcat


Hi Johnny,

Thanks for the answer but I think I didn't explain my problem correctly.

I need the following situation:
1. a java application has to run continiously outside tomcat (when tomcat 
crashes the application must be still running). This application runs in its 
own virtual machine (VM1).

2. I have also Axis2 webservices that have to have access to the objects in 
VM1. These webservices run inside Tomcat. However Tomcat runs in its own 
virtual machine (VM2). So I have a problem.

Question:
How to be able to run the java appplication (outside tomcat), and the Axis2 
webservices (inside tomcat), in the same virtual machine


thanks in advance
Slobodanka

________________________________

Van: Johnny Kewl [mailto:john@kewlstuff.co.za]
Verzonden: di 3-6-2008 15:57
Aan: Tomcat Users List
Onderwerp: Re: How to run own java application within Tomcat




----- Original Message -----
From: "Slobodanka Dimitrijevic" <sdimitrijevic@dirkzwager.com>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Tuesday, June 03, 2008 11:34 AM
Subject: RE: How to run own java application within Tomcat



Hi Johnny,
Thanks for your mail. Can you please tell me :

1. where should I stop Java executable inside Tomcat directory
structure?

2. which configuration file and what should I configure inside Tomecat
if I want to run executable java application during sturtup of Tomcat?

Thanks in advance,
Slobodanka Dimitrijevic


=============

Slobodanka just try this and you'll get the idea

I use NB but could be done with any IDE...

1) Make a Java application... normal Java application with some classes in
it.
Compile it and (if its NB its an executable) double click on the JAR file
(in the DIST folder)
It will run.

2) Now make a web project based on TC, in the libraries "select the
application" that you made before.
Make a little web page that uses one of the classes in the application
Compile it.... it will give you a WAR file and inside that war file... will
be your application.

Now you got one war file with the application in it... and the application
can run on its own as well, which is what I think you asking?

So if a user unzips the war file... they can run the application.
So now you have 2 in one.

You'll get the idea by just seeing where you application is used in the war.
So outside its a normal application, but inside the War its being used like
a library.

The web app has extra stuff, like web.xml and yada yada... but it doesnt
care, to it.... the application JAR is just a lib.

Then you play from there.... decide what classes you want to put where.

Its a design thing... not some web xml that you set.

Jars are zip files... they can be applications or libs... or a mix.

You cant just drop an application into tomcat and expect it to appear in a
web page... but you can share stuff.

The trick... make a application JAR.... the use that as a lib in TC.... NB
will pack it for you... no thinking required ;)

---------

The POJO Application Server is a completely different animal, and you'll
have to ask specific questions in their mailing list for that.
But that does literally allow you to drop the application into it, and the
UI side of that application (not a web service) literally jumps out of the
browser.
But the applications have to be designed for that.

Either way... there is some design to do.

Hope that helps....


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



"The Maritime Information & Service Provider"


This e-mail is confidential and may also be privileged. It is intended for 
use by the addressee only.
If you are not the intended addressee, we request that you notify us 
immediately and delete this e-mail,
and any attachment(s), without copying, forwarding, disclosing or using it 
in any other way. Royal
Dirkzwager will not be liable for damage relating to the communication by 
e-mail of data or documents.




--------------------------------------------------------------------------------


> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message