tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Hartung" <wi...@msoft.com>
Subject Re: Accessing Tomcat contexts from a desktop application?
Date Fri, 21 Feb 2003 01:27:13 GMT
> From: "Prashanth Pushpagiri" <prash_mail_lists@yahoo.com>
> Sent: Thursday, February 20, 2003 4:31 PM
> Subject: Accessing Tomcat contexts from a desktop application?


> Hi,
>
> I am looking for a way of accessing a web application
> context from a standalone desktop application. Is this
> even possible? Basically, I have a connection pool in
> my web application's context and would like to access
> that from the application. I would also like to
> extract some string and integer environment variables
> in my context. Please suggest any alternative ways I
> can achieve this. Perhaps some resources on how to go
> about doing this?

Well, I supposed you could always embed Tomcat into your Desktop App, (I'm
assuming that your app is in Java as well), but I don't think that this is
the answer you're looking for, and no doubt it's quite complicated.

Currently, the prescribed method is to "simply" use one of the Web Service
APIs and make remote calls into the instance to get your information, but of
course you have to write all of that (though getting a basic web service up
is pretty simple nowadays -- I think Apache AXIS is a local project).

On the other hand, Tomcat is "just" a Java application, so if you want to
fire off an RMI server thread during initialization, you can talk to it that
way as well, with all of the complications that entails.

But, no, there's not direct way to access the internals bits of the server
from a desktop application without actually embedding Tomcat into it.

Finally, as for getting environment variables, System.getEnv() exists, but
it's deprecated, so it's probably best to simply include them on the start
up command line: java -Dyour.env=$ENV ...

Regards,

Will Hartung
(willh@msoft.com)




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message