Re: directory listings per webapp
On Dec 14, 2007 4:17 PM, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > > From: Dan Armbrust [mailto:[EMAIL PROTECTED] > > Subject: Re: directory listings per webapp > > > > Thanks a lot. I'll see if I can get access to > > http://wiki.apache.org/tomcat/FAQ/Miscellaneous and update the answer > > to this question - since the current answer is pretty poor. > > In what way? It describes exactly what must be done - it really is that > simple. You created your own problem by putting in a docBase attribute > telling Tomcat where the webapp was locating and then editing a web.xml > for an entirely different deployment. Well, it does now :) Previously - it said "This is done in TOMCAT_HOME/conf/web.xml by changing the listings property for the default servlet." Not exactly very useful in finding out how to do it on a per-app basis. > > > It would be nice if someone could update > > http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html > > as well, because in general, having documentation basically say "if > > you don't know how to do this already, too bad" is just bad practice > > ;) > > I think you misunderstand the meaning of "customize" and perhaps are > confusing it with "configure". The section on customization discusses > only how directory listings are presented. > Its about the only other official doc reference that I came up with after doing a search - so between that and the lacking FAQ, I was left hunting the mailing list where about 50 people seem to have asked the question, and most go away with only turning it on globally. Thanks for your help. Dan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: directory listings per webapp
> From: Dan Armbrust [mailto:[EMAIL PROTECTED] > Subject: Re: directory listings per webapp > > Thanks a lot. I'll see if I can get access to > http://wiki.apache.org/tomcat/FAQ/Miscellaneous and update the answer > to this question - since the current answer is pretty poor. In what way? It describes exactly what must be done - it really is that simple. You created your own problem by putting in a docBase attribute telling Tomcat where the webapp was locating and then editing a web.xml for an entirely different deployment. > It would be nice if someone could update > http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html > as well, because in general, having documentation basically say "if > you don't know how to do this already, too bad" is just bad practice > ;) I think you misunderstand the meaning of "customize" and perhaps are confusing it with "configure". The section on customization discusses only how directory listings are presented. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: directory listings per webapp
> Probably not. You specified a docBase of /dir/foo for the foo webapp, > but appear to have been editing webapps/foo/WEB-INF/web.xml, which is > not where you've told Tomcat the app is deployed. It's extremely bad > practice to have a directory under the appBase that's the same as > one for an app with a docBase that points somewhere else. Ahh - there we go. I had tried putting the web.xml file there before - but at the time, I had the incorrect in my web.xml. Thanks a lot. I'll see if I can get access to http://wiki.apache.org/tomcat/FAQ/Miscellaneous and update the answer to this question - since the current answer is pretty poor. It would be nice if someone could update http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html as well, because in general, having documentation basically say "if you don't know how to do this already, too bad" is just bad practice ;) Thanks again, Dan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: directory listings per webapp
> From: Dan Armbrust [mailto:[EMAIL PROTECTED] > Subject: Re: directory listings per webapp > I made those two changes - but I still don't get any directory listing What do you get? Did you restart Tomcat (or insure that the webapp was otherwise redeployed)? What version of Tomcat are you using? To test what's under discussion, I changed webapps/docs/WEB-INF/web.xml to include the following: docsListing org.apache.catalina.servlets.DefaultServlet debug 0 listings true 1 docsListing / References to http://localhost:8080/docs/appdev/printer/docs/ now return a directory listing, whereas before a 404 came back. > Is my path correct for the web.xml file? Probably not. You specified a docBase of /dir/foo for the foo webapp, but appear to have been editing webapps/foo/WEB-INF/web.xml, which is not where you've told Tomcat the app is deployed. It's extremely bad practice to have a directory under the appBase that's the same as one for an app with a docBase that points somewhere else. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: directory listings per webapp
I made those two changes - but I still don't get any directory listing (I can get a file if I name it specifically - so I know that that context is working) Is my path correct for the web.xml file? Or am I missing something else? Thanks, Dan On Dec 14, 2007 3:17 PM, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > > From: Dan Armbrust [mailto:[EMAIL PROTECTED] > > Subject: directory listings per webapp > > > > > > > > Broken record: take out the path attribute; it's not allowed (but it's > not this problem). > > > > > foo > > /foo/* > > > > Change the to this: > / > > - 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 start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: directory listings per webapp
> From: Dan Armbrust [mailto:[EMAIL PROTECTED] > Subject: directory listings per webapp > > > Broken record: take out the path attribute; it's not allowed (but it's not this problem). > > foo > /foo/* > Change the to this: / - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: directory listings per webapp
There is a typo in the below. This > tomcat/server/webapps/billing/WEB-INF/web.xml Should have been tomcat/server/webapps/foo/WEB-INF/web.xml So thats not the problem. Dan On Dec 14, 2007 3:10 PM, Dan Armbrust <[EMAIL PROTECTED]> wrote: > I want to create a webapp that just lists the content of a directory - > but I don't want to turn on directory listing globally. > > I've seen lots of people say it can be done, just do but I've yet > to find a working example. Can someone tell me what I'm missing here? > > I have a file: > > tomcat/conf/Catalina/localhost/foo.xml > > The contents are: > > > > > > > Now this, all by itself works for creating the webapp, and it will get > a directory listing if I enable global directory listing in the > web.xml file, but I don't want that. > > So, I created: > > tomcat/server/webapps/billing/WEB-INF/web.xml > > The contents are: > > > Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";> > > > foo > > org.apache.catalina.servlets.DefaultServlet > > debug > 0 > > > listings > true > > 1 > > > > foo > /foo/* > > > > > > But this doesn't work. > > What do I need to do to make this happen? > > Thanks, > > Dan > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]