tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Native Library Error using Context forward in server.xml
Date Fri, 12 Aug 2016 12:38:01 GMT
> From: Pietag, Tobias (Enterprise Security Services) [mailto:tobias.pietag@hpe.com] 
> Subject: RE: Native Library Error using Context forward in server.xml

> We are using the Context in the server.xml to change the root application to a 
> different webapp. 

That's a really, really bad idea.  Name your default webapp ROOT, and be done with it.  Alternatively,
construct a ROOT webapp that does nothing but redirect to iiq (or vice-versa).

> <Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true" deployOnStartup="true"
>
>        <Context path="/" docBase="iiq" />

Read the doc and discover why that path attribute is using an illegal value, even when in
server.xml.
 
> So that the webapp can be call from https://url:8443/ and https://url:8443/iiq. 

You should do this with a redirect.

> If the webapp is open from both URLs, it will result in the following error.

That's because it's not "the webapp"; your configuration forces it to be deployed twice, once
as the default, once as iiq.  Each deployment uses a separate classloader so the underlying
classes (and native library references) cannot be mixed.
 
> It seems that the tomcat sees both URLs as different applications and tries to load native
library twice.

Exactly.

> After removing the Context element it's working without any error.

Except you cannot reach the webapp without using iiq in the URL.

> Is this the normal behavior with the Context element ?

Yes.

> Is there an option to change this behavior, or does it look like a bug ?

It's a bug in your configuration and deployment strategy.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.


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


Mime
View raw message