You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alexander Diedler <ad...@tecracer.de> on 2010/09/12 22:12:06 UTC
Tomcat & IIS - Understanding Context definition to access Webapps
Hello,
I think I have a little issue in my configuration of the webserver. I have a Windows 2003 Webserver with IIS and Tomcat Connector and two webapps, that should be delivered through the IIS. But I only get the default "Welcome Site" from Tomcat.
In my Tomcat 6.0.26 I have a Webapp A. It´s content is on C:\inetpub\wwwroot\SiteA
I define in the server.xml in the Engine:
---
<!-- www.websiteA.de -->
<Host name="webSiteA">
<Alias>www.websiteA.de</Alias>
<Alias>www.websiteAandmore.de</Alias>
</Host>
---
I create in conf/Catalina/localhost a new file called webSiteA.xml with this content:
---
<?xml version='1.0' encoding='utf-8'?>
<Context path="/" reloadable="true" docBase="C:\Inetpub\wwwroot\SiteA" distributable="true">
<Resource name="jdbc/jTDS"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="datauser"
password="XXXXXX"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://127.0.0.1:1433/xxx_xxxxxxxx;charset=UTF-8;"
/>
</Context>
---
After Startup the tomcat, in the conf/Catalina Directory, a new directory "WebSiteA appears with a host-manager.xml and manager.xml
In the Tomcat Web Application Manager-App (http://localhost:8080/manager/html) I can see a new Application /webSiteA and If i go to http://localhost:8080/webSiteA I got the content of the Webapp. Everything is fine.
But it seems, that the redirected requests from the IIS doesn´t have the right Header value and Tomcat doesn´t know where to redirect the request.
Is my configuration ok or is there an issue or is it not the "best practise" for hosting many webapps on one Server?
Greetings
Alexander
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: AW: Tomcat & IIS - Understanding Context definition to access
Webapps
Posted by Pid <pi...@pidster.com>.
On 14/09/2010 14:35, Alexander Diedler wrote:
> Hello,
> The target should be, to have the possibillity to restart every webapp through the Tomcat Manager. So for my understanding I have to map every App als path="/appname" in the context file.
I'm not sure I understand what you're saying.
The Manager application is installed once per host, and can manage any
other app in the same host, regardless of it's path. Do not set the
'path' attribute in META-INF/context.xml or e.g.
tomcat/conf/Catalina/host/myapp.xml.
p
> In your configuration, I have to open for every App a dedicated manager to restart them?
> I will test your suggestions tomorrow in my lab.
>
> Greetings
> Alexander
>
> ________________________________________
> Von: Pid [pid@pidster.com]
> Gesendet: Montag, 13. September 2010 23:15
> An: Tomcat Users List
> Betreff: Re: Tomcat & IIS - Understanding Context definition to access Webapps
>
> On 12/09/2010 22:09, Caldarale, Charles R wrote:
>>> From: Wesley Acheson [mailto:wesley.acheson@gmail.com]
>>> Subject: Re: Tomcat & IIS - Understanding Context definition to access Webapps
>>
>>>> I create in conf/Catalina/localhost a new file called webSiteA.xml with this content:
>>
>>> try creating it in conf/Catalina/webSiteA
>>
>> Need to be more explicit; the file must be named ROOT.xml (case sensitive), in the above directory.
>>
>>>> <Context path="/" reloadable="true" docBase="C:\Inetpub\wwwroot\SiteA"
>>>> distributable="true">
>>
>>> The path element will be ignored.
>>
>> It's not valid at all when the <Context> element is in the above location. (For what it's worth, the value specified is completely illegal; a plain slash is never used.) Also, there is no distributable attribute for <Context>, so get rid of that as well.
>
> Also, be wary of publishing any part of this URL directly via IIS:
>
> C:\Inetpub\wwwroot\SiteA
>
> Any config errors and your app components are exposed.
>
>
> p
>
>> 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
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
AW: Tomcat & IIS - Understanding Context definition to access
Webapps
Posted by Alexander Diedler <ad...@tecracer.de>.
Hello,
The target should be, to have the possibillity to restart every webapp through the Tomcat Manager. So for my understanding I have to map every App als path="/appname" in the context file.
In your configuration, I have to open for every App a dedicated manager to restart them?
I will test your suggestions tomorrow in my lab.
Greetings
Alexander
________________________________________
Von: Pid [pid@pidster.com]
Gesendet: Montag, 13. September 2010 23:15
An: Tomcat Users List
Betreff: Re: Tomcat & IIS - Understanding Context definition to access Webapps
On 12/09/2010 22:09, Caldarale, Charles R wrote:
>> From: Wesley Acheson [mailto:wesley.acheson@gmail.com]
>> Subject: Re: Tomcat & IIS - Understanding Context definition to access Webapps
>
>>> I create in conf/Catalina/localhost a new file called webSiteA.xml with this content:
>
>> try creating it in conf/Catalina/webSiteA
>
> Need to be more explicit; the file must be named ROOT.xml (case sensitive), in the above directory.
>
>>> <Context path="/" reloadable="true" docBase="C:\Inetpub\wwwroot\SiteA"
>>> distributable="true">
>
>> The path element will be ignored.
>
> It's not valid at all when the <Context> element is in the above location. (For what it's worth, the value specified is completely illegal; a plain slash is never used.) Also, there is no distributable attribute for <Context>, so get rid of that as well.
Also, be wary of publishing any part of this URL directly via IIS:
C:\Inetpub\wwwroot\SiteA
Any config errors and your app components are exposed.
p
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat & IIS - Understanding Context definition to access Webapps
Posted by Pid <pi...@pidster.com>.
On 12/09/2010 22:09, Caldarale, Charles R wrote:
>> From: Wesley Acheson [mailto:wesley.acheson@gmail.com]
>> Subject: Re: Tomcat & IIS - Understanding Context definition to access Webapps
>
>>> I create in conf/Catalina/localhost a new file called webSiteA.xml with this content:
>
>> try creating it in conf/Catalina/webSiteA
>
> Need to be more explicit; the file must be named ROOT.xml (case sensitive), in the above directory.
>
>>> <Context path="/" reloadable="true" docBase="C:\Inetpub\wwwroot\SiteA"
>>> distributable="true">
>
>> The path element will be ignored.
>
> It's not valid at all when the <Context> element is in the above location. (For what it's worth, the value specified is completely illegal; a plain slash is never used.) Also, there is no distributable attribute for <Context>, so get rid of that as well.
Also, be wary of publishing any part of this URL directly via IIS:
C:\Inetpub\wwwroot\SiteA
Any config errors and your app components are exposed.
p
> 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
>
RE: Tomcat & IIS - Understanding Context definition to access
Webapps
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Wesley Acheson [mailto:wesley.acheson@gmail.com]
> Subject: Re: Tomcat & IIS - Understanding Context definition to access Webapps
> > I create in conf/Catalina/localhost a new file called webSiteA.xml with this content:
> try creating it in conf/Catalina/webSiteA
Need to be more explicit; the file must be named ROOT.xml (case sensitive), in the above directory.
> > <Context path="/" reloadable="true" docBase="C:\Inetpub\wwwroot\SiteA"
> > distributable="true">
> The path element will be ignored.
It's not valid at all when the <Context> element is in the above location. (For what it's worth, the value specified is completely illegal; a plain slash is never used.) Also, there is no distributable attribute for <Context>, so get rid of that as well.
- 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
Re: Tomcat & IIS - Understanding Context definition to access Webapps
Posted by Wesley Acheson <we...@gmail.com>.
On Sun, Sep 12, 2010 at 10:12 PM, Alexander Diedler
<ad...@tecracer.de> wrote:
> I create in conf/Catalina/localhost a new file called webSiteA.xml with this content:
> ---
try creating it in conf/Catalina/webSiteA. The folder structure is
conf/[Engine]/[host]
> <?xml version='1.0' encoding='utf-8'?>
> <Context path="/" reloadable="true" docBase="C:\Inetpub\wwwroot\SiteA" distributable="true">
The path element will be ignored. I believe.
Regards,
Wes
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org