Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: virtual host doesn't load database content

Luke Vanderfluit

2005-08-29

Replies:

Hi.

I solved this myself by placing the database resource tag in the server.xml
instead of in a separate context.xml file in the META-INF directory.

I don't know why that has to be that way.

KR.
Luke.

29Aug2005 @ 15:39 luke@(protected)
> Hi.
>
> I have a domain resolving to a tomcat box.
> I have set up a virtual host. No probs.
>
> /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     <Host name="localhost" appBase="webapps"
>     unpackWARs="true" autoDeploy="true"
>     xmlValidation="false" xmlNamespaceAware="false">
>     </Host>
>
>
>     <Host name="albino.info"
>       appBase="webapps"
>       unpackWARs="true"
>       autoDeploy="true"
>       xmlValidation="false"
>       xmlNamespaceAware="false">
>       <Alias>www.albino.info</Alias>
>       <Context path=""
>         docBase="/progs/tomcat559/webapps/megaboard02"
>         debug="0"
>         reloadable="true">
>       </Context>
>     </Host>
> \____________________________________________
>
> That all works well.....
> However the <welcome-file> or 'default page' for this site
> requires database access.
>
> If I set up docBase as:
> 'docBase="/progs/tomcat559/webapps"'
> and try accessing the address www.albino.info/megaboard02,
> no probs......... the database results are shown.
>
> but if I set docbase as
> 'docBase="/progs/tomcat559/webapps/megaboard02"'
> and try accessing the address www.albino.info,
> there's no content from the database.
>
> I want to use www.albino.info as the home page without anything added.
> and I want it to include the database stuff.
>
> What am I doing wrong?
>
> Kind regards.
> Luke.
>
> --
> ............._..
> .| .| |.|/.|_ .
> .|__.|_|.|\.|_ .
> :61 421 276 282:
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
> For additional commands, e-mail: tomcat-user-help@(protected)
>

--
............._..
.| .| |.|/.|_ .
.|__.|_|.|\.|_ .
:61 421 276 282:

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.