You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Chaplin <ch...@vcu.edu> on 2005/11/13 00:06:37 UTC
tomcat 5.5.9 basic config
I'm stumped on a simple issue. I have only one webapp in my
tomcat5/webapps directory called "crypto"
my context tags within the host tag of my server.xml is:
<Context path=""
docBase="/usr/share/tomcat5/webapps"
debug="9" reloadable="true"
privileged="true" allowLinking="true" >
</Context>
<Context path="/crypto"
docBase="/usr/share/tomcat5/webapps"
debug="9" reloadable="true"
privileged="true" allowLinking="true" >
</Context>
I would expect that browsing to http://gus.csbc.vcu.edu:8080/crypto/ (or
http://gus.csbc.vcu.edu:8080) would bring up my default page, instead I
get a directory listing of one directory, crypto, which when I click on
it, then I get my default page! What's wrong, or is this normal?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat 5.5.9 basic config
Posted by Hassan Schroeder <ha...@webtuitive.com>.
michael chaplin wrote:
> Thanks for the advice about moving the context tag. I moved it as you
> suggested and it works the same.
Then either you didn't do exactly as I said, or there's something
else wrong in your configuration.
You won't have these problems described below when your default
webapp is correctly configured.
To spare the list the traffic, perhaps you can send me off-list
your entire server.xml file, and an `ls -lR $CATALINA_HOME/conf`
listing.
> But, that doesn't answer the question, how do I get it so when someone
> browses to my webapp root they get the default page, say index.jsp,
> instead of a directory listing. I don't want user's to go to a
> directory.
>
> The reason I ask is none of my pages that use relative urls are
> displaying correctly (a helloworld.jsp works fine), my suspiscion is
> this extra directory level is throwing the relative urls off (see
> http://gus.csbc.vcu.edu:8080/crypto/)
--
Hassan Schroeder ----------------------------- hassan@webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: tomcat 5.5.9 basic config
Posted by Rick <to...@vidyah.com>.
>But, that doesn't answer the question, how do I get it so when someone
browses to my
>webapp root they get the default page, say index.jsp, instead of a
directory listing.
>I don't want user's to go to a directory.
To change you're "default" page so that you don't show a directory listing..
You need to setup your welcome file list in your webapp's web.xml file.
Located in... <catalina_home>/webapps/<appfolder>/WEB-INF/web.xml
---------------------------------
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
---------------------------------
-Rick
-----Original Message-----
From: michael chaplin [mailto:chaplinmd@vcu.edu]
Posted At: Saturday, November 12, 2005 5:17 PM
Posted To: Tomcat Dev
Conversation: tomcat 5.5.9 basic config
Subject: Re: tomcat 5.5.9 basic config
Thanks for the advice about moving the context tag. I moved it as you
suggested and it works the same.
But, that doesn't answer the question, how do I get it so when someone
browses to my webapp root they get the default page, say index.jsp, instead
of a directory listing. I don't want user's to go to a directory.
The reason I ask is none of my pages that use relative urls are displaying
correctly (a helloworld.jsp works fine), my suspiscion is this extra
directory level is throwing the relative urls off (see
http://gus.csbc.vcu.edu:8080/crypto/)
On Sat, 2005-11-12 at 18:33, Hassan Schroeder wrote:
> Michael Chaplin wrote:
> > I'm stumped on a simple issue. I have only one webapp in my
> > tomcat5/webapps directory called "crypto"
> >
> > my context tags within the host tag of my server.xml is:
> >
> > <Context path=""
> > docBase="/usr/share/tomcat5/webapps"
> > debug="9" reloadable="true"
> > privileged="true" allowLinking="true" >
> > </Context>
> > <Context path="/crypto"
> > docBase="/usr/share/tomcat5/webapps"
> > debug="9" reloadable="true"
> > privileged="true" allowLinking="true" >
> > </Context>
> >
> > I would expect that browsing to http://gus.csbc.vcu.edu:8080/crypto/ (or
> > http://gus.csbc.vcu.edu:8080) would bring up my default page, instead I
> > get a directory listing of one directory, crypto, which when I click on
> > it, then I get my default page! What's wrong, or is this normal?
>
> It's doing exactly what you're telling it to, looking for your app's
> pages in '/usr/share/tomcat5/webapps' :-)
>
> However, putting Context elements in server.xml is discouraged.
>
> You should create a file named (assuming a vanilla install):
>
> $CATALINA_HOME/conf/Catalina/localhost/ROOT.xml
>
> :: containing:
>
> <Context
> docBase="/usr/share/tomcat5/webapps/crypto"
> debug="9" reloadable="true"
> privileged="true" allowLinking="true" >
> </Context>
>
> :: which will make it your default webapp, accessed directly using
> "http://gus.csbc.vcu.edu:8080/"...
>
> HTH,
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat 5.5.9 basic config
Posted by michael chaplin <ch...@vcu.edu>.
Thanks for the advice about moving the context tag. I moved it as you
suggested and it works the same.
But, that doesn't answer the question, how do I get it so when someone
browses to my webapp root they get the default page, say index.jsp,
instead of a directory listing. I don't want user's to go to a
directory.
The reason I ask is none of my pages that use relative urls are
displaying correctly (a helloworld.jsp works fine), my suspiscion is
this extra directory level is throwing the relative urls off (see
http://gus.csbc.vcu.edu:8080/crypto/)
On Sat, 2005-11-12 at 18:33, Hassan Schroeder wrote:
> Michael Chaplin wrote:
> > I'm stumped on a simple issue. I have only one webapp in my
> > tomcat5/webapps directory called "crypto"
> >
> > my context tags within the host tag of my server.xml is:
> >
> > <Context path=""
> > docBase="/usr/share/tomcat5/webapps"
> > debug="9" reloadable="true"
> > privileged="true" allowLinking="true" >
> > </Context>
> > <Context path="/crypto"
> > docBase="/usr/share/tomcat5/webapps"
> > debug="9" reloadable="true"
> > privileged="true" allowLinking="true" >
> > </Context>
> >
> > I would expect that browsing to http://gus.csbc.vcu.edu:8080/crypto/ (or
> > http://gus.csbc.vcu.edu:8080) would bring up my default page, instead I
> > get a directory listing of one directory, crypto, which when I click on
> > it, then I get my default page! What's wrong, or is this normal?
>
> It's doing exactly what you're telling it to, looking for your app's
> pages in '/usr/share/tomcat5/webapps' :-)
>
> However, putting Context elements in server.xml is discouraged.
>
> You should create a file named (assuming a vanilla install):
>
> $CATALINA_HOME/conf/Catalina/localhost/ROOT.xml
>
> :: containing:
>
> <Context
> docBase="/usr/share/tomcat5/webapps/crypto"
> debug="9" reloadable="true"
> privileged="true" allowLinking="true" >
> </Context>
>
> :: which will make it your default webapp, accessed directly using
> "http://gus.csbc.vcu.edu:8080/"...
>
> HTH,
Re: tomcat 5.5.9 basic config
Posted by Hassan Schroeder <ha...@webtuitive.com>.
Michael Chaplin wrote:
> I'm stumped on a simple issue. I have only one webapp in my
> tomcat5/webapps directory called "crypto"
>
> my context tags within the host tag of my server.xml is:
>
> <Context path=""
> docBase="/usr/share/tomcat5/webapps"
> debug="9" reloadable="true"
> privileged="true" allowLinking="true" >
> </Context>
> <Context path="/crypto"
> docBase="/usr/share/tomcat5/webapps"
> debug="9" reloadable="true"
> privileged="true" allowLinking="true" >
> </Context>
>
> I would expect that browsing to http://gus.csbc.vcu.edu:8080/crypto/ (or
> http://gus.csbc.vcu.edu:8080) would bring up my default page, instead I
> get a directory listing of one directory, crypto, which when I click on
> it, then I get my default page! What's wrong, or is this normal?
It's doing exactly what you're telling it to, looking for your app's
pages in '/usr/share/tomcat5/webapps' :-)
However, putting Context elements in server.xml is discouraged.
You should create a file named (assuming a vanilla install):
$CATALINA_HOME/conf/Catalina/localhost/ROOT.xml
:: containing:
<Context
docBase="/usr/share/tomcat5/webapps/crypto"
debug="9" reloadable="true"
privileged="true" allowLinking="true" >
</Context>
:: which will make it your default webapp, accessed directly using
"http://gus.csbc.vcu.edu:8080/"...
HTH,
--
Hassan Schroeder ----------------------------- hassan@webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat 5.5.9 basic config
Posted by David Smith <dn...@cornell.edu>.
Just finish the docBase attribute as in:
<Context path=""
docBase="/usr/share/tomcat5/webapps/crypto"
debug="9" reloadable="true"
privileged="true" allowLinking="true" >
</Context>
--David
Michael Chaplin wrote:
> I'm stumped on a simple issue. I have only one webapp in my
> tomcat5/webapps directory called "crypto"
>
> my context tags within the host tag of my server.xml is:
>
> <Context path=""
> docBase="/usr/share/tomcat5/webapps"
> debug="9" reloadable="true"
> privileged="true" allowLinking="true" >
> </Context>
> <Context path="/crypto"
> docBase="/usr/share/tomcat5/webapps"
> debug="9" reloadable="true"
> privileged="true" allowLinking="true" >
> </Context>
>
> I would expect that browsing to http://gus.csbc.vcu.edu:8080/crypto/
> (or http://gus.csbc.vcu.edu:8080) would bring up my default page,
> instead I get a directory listing of one directory, crypto, which when
> I click on it, then I get my default page! What's wrong, or is this
> normal?
>
> ---------------------------------------------------------------------
> 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