tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier (tomcat) ...@ice-sa.com>
Subject Re: Is there a way for code running on Tomcat 7+ to determine the URL of the Web App it's running under?
Date Fri, 12 Feb 2016 20:20:32 GMT
On 12.02.2016 21:00, Leo Donahue wrote:
> On Feb 11, 2016 4:56 PM, "Dougherty, Gregory T., M.S." <
> Dougherty.Gregory@mayo.edu> wrote:
>>
>> I would like to have a jar file in tomcat/lib that can be called from any
> of the running web apps.  I need for the code in the jar to behave
> differently depending on which web app called it.
>
> I would agree with what the others are saying here.  It seems you are
> trying to authorize an entire web app instead of authoring the user of the
> web app.
>
> If the jar simply needs to take action based on a role of some kind, then
> could you not tie in a ldap user with appropriate role?
>

I do not know either what the ultimate use case of the OP is.
But I could imagine for example some webapps allowing to upload a file, and this jar 
containing a "saveFile" method which saves the file to a different server directory, 
depending on which webapp called it (but without relying for this on a parameter passed by

the webapp or its configuration, and just relying on the URL having been used to call that

webapp).
(Of course there are other ways to achieve this, but this is just as a non-AAA example).

Gregory, it may be time to tell us something about what you /really/ want to achieve here.


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


Mime
View raw message