Display directory contents instead of error

I don’t have an index.cfm in my vhost directory nor do I want one. So when
I browse to the directory I get

Error (missinginclude)MessagePage /index.cfm
[/Users/x/Sites/xxxx/xxxx/index.cfm] not found
which is understandable.

How do I turn on directory listings?

Thanks in advance.

If your lucee install is running on Tomcat, adjust this setting in web.xml:

listings true Most of the embedded Lucee and Railo servers I’ve used have directory listing on by default, though. Is there possibly an include call in your Application.cfc onRequest() method?On February 23, 2015 at 5:17:45 PM, DMan (@DMan) wrote:

I don’t have an index.cfm in my vhost directory nor do I want one. So when I browse to the directory I get

Error (missinginclude)
Message Page /index.cfm [/Users/x/Sites/xxxx/xxxx/index.cfm] not found
which is understandable.

How do I turn on directory listings?

Thanks in advance.

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/0ee5e239-1b11-44d0-9c4b-8e1dca70d72e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nope nothing, a vanilla Lucee install with just a couple of vhosts in
server.xmlOn Monday, February 23, 2015 at 10:58:50 PM UTC, Jon Clausen wrote:

Do you have any rewrite rules in place which might be directing 404
traffic to index.cfm or a custom 404 handler looking for that file?

[Note: Typo assistance courtesy of iPhone]

On Feb 23, 2015, at 5:53 PM, DMan <roo...@gmail.com <javascript:>> wrote:

Thanks John.

Lucee express has this off by default. I want this setting server wide
hence I’d like to set it once for all sites and not per Site.

I’ve modified that to true like below:

servlet>
default

org.apache.catalina.servlets.DefaultServlet

debug
0


listings
true

1

Restarted Lucee but still I get an error as Tomcat is looking for
index.cfm :frowning:


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/d6c6a1cd-c9e8-4e46-b27e-ebfc82dafd09%40googlegroups.com
https://groups.google.com/d/msgid/lucee/d6c6a1cd-c9e8-4e46-b27e-ebfc82dafd09%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

https://tomcat.apache.org/tomcat-7.0-doc/config/context.html

Use the “resourceOnlyServlets” attribute.

Warm Regards,
Jordan MichaelsOn 02/23/2015 03:00 PM, DMan wrote:

Nope nothing, a vanilla Lucee install with just a couple of vhosts in
server.xml

On Monday, February 23, 2015 at 10:58:50 PM UTC, Jon Clausen wrote:

Do you have any rewrite rules in place which might be directing 404
traffic to index.cfm or a custom 404 handler looking for that file?

[Note: Typo assistance courtesy of iPhone]

On Feb 23, 2015, at 5:53 PM, DMan <roo...@gmail.com <javascript:>> wrote:
Thanks John.

Lucee express has this off by default. I want this setting server
wide hence I'd like to set it once for all sites and not per Site.

I've modified that to true like below:

servlet>
        <servlet-name>default</servlet-name>

<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

Restarted Lucee but still I get an error as Tomcat is looking for
index.cfm :(

--
You received this message because you are subscribed to the Google
Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/d6c6a1cd-c9e8-4e46-b27e-ebfc82dafd09%40googlegroups.com
<https://groups.google.com/d/msgid/lucee/d6c6a1cd-c9e8-4e46-b27e-ebfc82dafd09%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.


You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/1712de6e-b8cd-44b6-8d0c-ac83e9fc2daf%40googlegroups.com
https://groups.google.com/d/msgid/lucee/1712de6e-b8cd-44b6-8d0c-ac83e9fc2daf%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

Do you have any rewrite rules in place which might be directing 404 traffic to index.cfm or a custom 404 handler looking for that file?

[Note: Typo assistance courtesy of iPhone]> On Feb 23, 2015, at 5:53 PM, DMan <@DMan> wrote:

Thanks John.

Lucee express has this off by default. I want this setting server wide hence I’d like to set it once for all sites and not per Site.

I’ve modified that to true like below:

servlet>
default
org.apache.catalina.servlets.DefaultServlet

debug
0


listings
true

1

Restarted Lucee but still I get an error as Tomcat is looking for index.cfm :frowning:

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/d6c6a1cd-c9e8-4e46-b27e-ebfc82dafd09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks John.

Lucee express has this off by default. I want this setting server wide
hence I’d like to set it once for all sites and not per Site.

I’ve modified that to true like below:

servlet>
default

org.apache.catalina.servlets.DefaultServlet

debug
0


listings
true

1

Restarted Lucee but still I get an error as Tomcat is looking for index.cfm
:frowning:

You can also do a listening in your application.cfc in the
onMissingTemplate method…

MichaAm Montag, 23. Februar 2015 schrieb DMan :

I don’t have an index.cfm in my vhost directory nor do I want one. So when
I browse to the directory I get

Error (missinginclude)MessagePage /index.cfm
[/Users/x/Sites/xxxx/xxxx/index.cfm] not found
which is understandable.

How do I turn on directory listings?

Thanks in advance.


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com
<javascript:_e(%7B%7D,‘cvml’,‘lucee%2Bunsubscribe@googlegroups.com’);>.
To post to this group, send email to lucee@googlegroups.com
<javascript:_e(%7B%7D,‘cvml’,‘lucee@googlegroups.com’);>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/0ee5e239-1b11-44d0-9c4b-8e1dca70d72e%40googlegroups.com
https://groups.google.com/d/msgid/lucee/0ee5e239-1b11-44d0-9c4b-8e1dca70d72e%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

I’m trying to do this now with Lucee 5 Express - any clue as to actually
use how to use the attribute? I can’t find this as an existing setting
anywhere.On Monday, February 23, 2015 at 5:39:01 PM UTC-6, Jordan Michaels wrote:

https://tomcat.apache.org/tomcat-7.0-doc/config/context.html

Use the “resourceOnlyServlets” attribute.

Warm Regards,
Jordan Michaels

On 02/23/2015 03:00 PM, DMan wrote:

Nope nothing, a vanilla Lucee install with just a couple of vhosts in
server.xml

No go. I even tried adding default:

(As an aside, docBase does nothing either, but one problem at a time. ;)On Thu, Jul 21, 2016 at 9:26 PM, Joseph Gooch <@Joseph_Gooch> wrote:

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO type
things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:
openbd-core/SearchEngineFriendlyURLFilter.java at master · OpenBD/openbd-core · GitHub

Ah, that fixed docBase. Thank you! I still can’t browse directories though. :)On Fri, Jul 22, 2016 at 7:36 AM, Joseph Gooch <@Joseph_Gooch> wrote:

I don’t think docBase is honored in conf/context.xml. (otherwise all your
web contexts would have the same directory)

Copy conf/context.xml to conf/Catalina/localhost/ROOT.xml

I bet it’ll magically work then.
-G

On Fri, Jul 22, 2016 at 8:26 AM, Raymond Camden <@Raymond_Camden> wrote:

No go. I even tried adding default:

(As an aside, docBase does nothing either, but one problem at a time. :wink:

On Thu, Jul 21, 2016 at 9:26 PM, Joseph Gooch <@Joseph_Gooch> wrote:

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO type
things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:

openbd-core/SearchEngineFriendlyURLFilter.java at master · OpenBD/openbd-core · GitHub


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead
of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAK2avF8dGuS7w2xhAeLKvYwpa-HkbyKPUqLmN2i5Z2-GQDejmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead
of 210€. Visit CFCamp 2016

You received this message because you are subscribed to a topic in the
Google Groups “Lucee” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/lucee/ivoCv0Hn4dM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAKY58c5s6RDLdnsO46f6agxbVpTzHLBAHBK3bNE8pcJNGamJGw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Raymond Camden, Developer Advocate for StrongLoop at IBM

Email : @Raymond_Camden
Blog : www.raymondcamden.com
Twitter: raymondcamden

Having to remove it from welcome-files is the behavior that
resourceOnlyServlets should fix…

Here’s my context.xml (copied to ROOT.xml) and web.xml for comparison

I’m testing with a directory that doesn’t have an index.cfm or index.lucee.
(or index.anything)

I also have the Search Friendly URLs filter in there to preserve that
behavior.On Fri, Jul 22, 2016 at 8:44 AM, Harry Klein <@Harry_Klein> wrote:

Yes this change will always list directories, even if index.cfm exists.
Which is fine for me in development.
Unfortunately I am not aware of a more “intelligent” solution which only
lists directories if the defined “welcome-file” is not found.

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag
von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:41
An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

And that fixed it. But to be clear, that ‘feels’ wrong to me. What I mean
is, given a request to /, I’d want Lucee to load index.cfm/index.html if
it exists
, and if not, show a listing. Does this change break that?

On Fri, Jul 22, 2016 at 7:38 AM, Harry Klein <@Harry_Klein> wrote:

Did you deactivate/change the welcome-file-list in conf/web.xml too?

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag
von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:26
An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

No go. I even tried adding default:

(As an aside, docBase does nothing either, but one problem at a time.
:wink:

On Thu, Jul 21, 2016 at 9:26 PM, Joseph Gooch <@Joseph_Gooch> wrote:

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO
type things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:
openbd-core/src/com/newatlanta at master · OpenBD/openbd-core · GitHub
f ilters/SearchEngineFriendlyURLFilter.java


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAK2avF8dGuS7w2xhAeLKvYwpa-HkbyKPUqLmN2i5Z2-GQDejmA%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to a topic in the
Google Groups “Lucee” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/lucee/ivoCv0Hn4dM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/683ca7f10b994d1c81cd9288222f0da0%40srv-dc3.contens.local
.
For more options, visit https://groups.google.com/d/optout.

Raymond Camden, Developer Advocate for StrongLoop at IBM

Email : @Raymond_Camden
Blog : www.raymondcamden.com
Twitter: raymondcamden


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAK2avF8w9APBXkeTbs9ChSmdEjKZOsjougfDqrPo0cQBBxnNMQ%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/bbaa9dc2b5d841cea95439b6c71cf177%40srv-dc3.contens.local
.
For more options, visit https://groups.google.com/d/optout.

context.xml (1.81 KB)

web.xml (171 KB)

Interesting, it didn’t seem to work for Raymond either. You did the
resourceOnlyServlets in conf/context.xml (or
conf/Catalina/localhost/ROOT.xml)?

Not sure why it’s working for me. Is there something else different in my
files vs yours?

SearchEngineFriendlyURLFilter is only necessary for SES urls. (i.e.
/index.cfm/this/is/a/website) Because no file named website in a path
called /index.cfm/this/is/a/ exists. (so resourceOnlyServlets will prevent
the mapping from being issued against CFMLServlet)

The filter internally rewrites the above request as /index.cfm with a
PATH_INFO of /this/is/a/website before mappings occur.

-GOn Fri, Jul 22, 2016 at 9:15 AM, Harry Klein <@Harry_Klein> wrote:

Thanks Joseph, I never heard about „resourceOnlyServlets“.

I tried approach 2) but it didn’t work for me – is the
SearchEngineFriendlyURLFilter required?

The only changes I did:

resourceOnlyServlets=“CFMLServlet” (I deactivated the Lucee servlet)

and

uncomment the welcome-files.

-Harry

Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] *Im Auftrag
von *Joseph Gooch
Gesendet: Freitag, 22. Juli 2016 15:10

An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

So to summarize what I’ve seen for posterity :slight_smile:

Options are:

  1. Set listings=true in the defaultservlet. Remove index.cfm (and
    index.lucee) from welcome-files. This gives directory listings, but
    doesn’t auto-load index.cfm files. index.cfm/anypath type links should
    still work.

  2. Set listings=true in the defaultservlet. set resourceOnlyServlets to
    LuceeServlet,CFMLServlet. Implement another solution for SES urls -
    tuckey’s urlrewrite or OpenBD’s SES filter or something else.

  3. Write your own directory listing support via onMissingMethod in
    Application.cfc

Arguably, this should probably be easier out of the box with Lucee Express
:slight_smile: I’ll submit a JIRA. It might be worth including the tuckey urlrewrite
filter in lucee express as it has other benefits/potential use cases.

-G

On Fri, Jul 22, 2016 at 8:48 AM, Joseph Gooch <@Joseph_Gooch> wrote:

Having to remove it from welcome-files is the behavior that
resourceOnlyServlets should fix…

Here’s my context.xml (copied to ROOT.xml) and web.xml for comparison

I’m testing with a directory that doesn’t have an index.cfm or
index.lucee. (or index.anything)

I also have the Search Friendly URLs filter in there to preserve that
behavior.

On Fri, Jul 22, 2016 at 8:44 AM, Harry Klein <@Harry_Klein> wrote:

Yes this change will always list directories, even if index.cfm exists.
Which is fine for me in development.
Unfortunately I am not aware of a more “intelligent” solution which only
lists directories if the defined “welcome-file” is not found.

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag
von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:41

An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

And that fixed it. But to be clear, that ‘feels’ wrong to me. What I mean
is, given a request to /, I’d want Lucee to load index.cfm/index.html if
it exists
, and if not, show a listing. Does this change break that?

On Fri, Jul 22, 2016 at 7:38 AM, Harry Klein <@Harry_Klein> wrote:

Did you deactivate/change the welcome-file-list in conf/web.xml too?

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag
von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:26
An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

No go. I even tried adding default:

(As an aside, docBase does nothing either, but one problem at a time.
:wink:

On Thu, Jul 21, 2016 at 9:26 PM, Joseph Gooch <@Joseph_Gooch> wrote:

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO
type things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:
openbd-core/src/com/newatlanta at master · OpenBD/openbd-core · GitHub

f ilters/SearchEngineFriendlyURLFilter.java


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAK2avF8dGuS7w2xhAeLKvYwpa-HkbyKPUqLmN2i5Z2-GQDejmA%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to a topic in the
Google Groups “Lucee” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/lucee/ivoCv0Hn4dM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/683ca7f10b994d1c81cd9288222f0da0%40srv-dc3.contens.local
.
For more options, visit https://groups.google.com/d/optout.

Raymond Camden, Developer Advocate for StrongLoop at IBM

Email : @Raymond_Camden
Blog : www.raymondcamden.com
Twitter: raymondcamden


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAK2avF8w9APBXkeTbs9ChSmdEjKZOsjougfDqrPo0cQBBxnNMQ%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.

To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/bbaa9dc2b5d841cea95439b6c71cf177%40srv-dc3.contens.local
.

For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAKY58c5FZ771GG3Vz8%2BpRfLO3SMB5pZRRnvegdmpvb079HU8nA%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAKY58c5FZ771GG3Vz8%2BpRfLO3SMB5pZRRnvegdmpvb079HU8nA%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/56ed73fd39914b569585ff8d33666fa7%40srv-dc3.contens.local
https://groups.google.com/d/msgid/lucee/56ed73fd39914b569585ff8d33666fa7%40srv-dc3.contens.local?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

Did you deactivate/change the welcome-file-list in conf/web.xml too?

-Harry-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:26
An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

No go. I even tried adding default:

(As an aside, docBase does nothing either, but one problem at a time. :wink:

On Thu, Jul 21, 2016 at 9:26 PM, Joseph Gooch <@Joseph_Gooch> wrote:

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO
type things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:
https://github.com/OpenBD/openbd-core/blob/master/src/com/newatlanta/f
ilters/SearchEngineFriendlyURLFilter.java


Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAK2avF8dGuS7w2xhAeLKvYwpa-HkbyKPUqLmN2i5Z2-GQDejmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

For now - I’m happy - I got my doc root changed and directory listings
on. I’d like it to auto load index.cfm too (when it exists), but I can
live without it. This is just for my laptop, not production.

Thank you to everyone. :)On Fri, Jul 22, 2016 at 7:48 AM, Joseph Gooch <@Joseph_Gooch> wrote:

Having to remove it from welcome-files is the behavior that
resourceOnlyServlets should fix…

Here’s my context.xml (copied to ROOT.xml) and web.xml for comparison

I’m testing with a directory that doesn’t have an index.cfm or index.lucee.
(or index.anything)

I also have the Search Friendly URLs filter in there to preserve that
behavior.

On Fri, Jul 22, 2016 at 8:44 AM, Harry Klein <@Harry_Klein> wrote:

Yes this change will always list directories, even if index.cfm exists.
Which is fine for me in development.
Unfortunately I am not aware of a more “intelligent” solution which only
lists directories if the defined “welcome-file” is not found.

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von
Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:41
An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

And that fixed it. But to be clear, that ‘feels’ wrong to me. What I mean
is, given a request to /, I’d want Lucee to load index.cfm/index.html if it
exists
, and if not, show a listing. Does this change break that?

On Fri, Jul 22, 2016 at 7:38 AM, Harry Klein <@Harry_Klein> wrote:

Did you deactivate/change the welcome-file-list in conf/web.xml too?

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag
von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:26
An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

No go. I even tried adding default:

(As an aside, docBase does nothing either, but one problem at a time.
:wink:

On Thu, Jul 21, 2016 at 9:26 PM, Joseph Gooch <@Joseph_Gooch> wrote:

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO
type things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:
openbd-core/src/com/newatlanta at master · OpenBD/openbd-core · GitHub
f ilters/SearchEngineFriendlyURLFilter.java


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAK2avF8dGuS7w2xhAeLKvYwpa-HkbyKPUqLmN2i5Z2-GQDejmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to a topic in the
Google Groups “Lucee” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/lucee/ivoCv0Hn4dM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/683ca7f10b994d1c81cd9288222f0da0%40srv-dc3.contens.local.
For more options, visit https://groups.google.com/d/optout.

===========================================================================
Raymond Camden, Developer Advocate for StrongLoop at IBM

Email : @Raymond_Camden
Blog : www.raymondcamden.com
Twitter: raymondcamden


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead
of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAK2avF8w9APBXkeTbs9ChSmdEjKZOsjougfDqrPo0cQBBxnNMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead
of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/bbaa9dc2b5d841cea95439b6c71cf177%40srv-dc3.contens.local.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead
of 210€. Visit CFCamp 2016

You received this message because you are subscribed to a topic in the
Google Groups “Lucee” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/lucee/ivoCv0Hn4dM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAKY58c4%2Bq%3D7J5JiYbhxY89d1nbEYiBe66AawRXUJ1Hi_vK%2BH5g%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Raymond Camden, Developer Advocate for StrongLoop at IBM

Email : @Raymond_Camden
Blog : www.raymondcamden.com
Twitter: raymondcamden

I don’t think docBase is honored in conf/context.xml. (otherwise all your
web contexts would have the same directory)

Copy conf/context.xml to conf/Catalina/localhost/ROOT.xml

I bet it’ll magically work then.
-GOn Fri, Jul 22, 2016 at 8:26 AM, Raymond Camden <@Raymond_Camden> wrote:

No go. I even tried adding default:

(As an aside, docBase does nothing either, but one problem at a time. :wink:

On Thu, Jul 21, 2016 at 9:26 PM, Joseph Gooch <@Joseph_Gooch> wrote:

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO type
things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:

openbd-core/SearchEngineFriendlyURLFilter.java at master · OpenBD/openbd-core · GitHub


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAK2avF8dGuS7w2xhAeLKvYwpa-HkbyKPUqLmN2i5Z2-GQDejmA%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.

Thanks Joseph, I never heard about „resourceOnlyServlets“.
I tried approach 2) but it didn’t work for me – is the SearchEngineFriendlyURLFilter required?

The only changes I did:
resourceOnlyServlets=“CFMLServlet” (I deactivated the Lucee servlet)
and
uncomment the welcome-files.

-HarryVon: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von Joseph Gooch
Gesendet: Freitag, 22. Juli 2016 15:10
An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

So to summarize what I’ve seen for posterity :slight_smile:

Options are:

  1. Set listings=true in the defaultservlet. Remove index.cfm (and index.lucee) from welcome-files. This gives directory listings, but doesn’t auto-load index.cfm files. index.cfm/anypath type links should still work.
  2. Set listings=true in the defaultservlet. set resourceOnlyServlets to LuceeServlet,CFMLServlet. Implement another solution for SES urls - tuckey’s urlrewrite or OpenBD’s SES filter or something else.
  3. Write your own directory listing support via onMissingMethod in Application.cfc

Arguably, this should probably be easier out of the box with Lucee Express :slight_smile: I’ll submit a JIRA. It might be worth including the tuckey urlrewrite filter in lucee express as it has other benefits/potential use cases.

-G

On Fri, Jul 22, 2016 at 8:48 AM, Joseph Gooch <@Joseph_Goochmailto:Joseph_Gooch> wrote:
Having to remove it from welcome-files is the behavior that resourceOnlyServlets should fix…

Here’s my context.xml (copied to ROOT.xml) and web.xml for comparison

I’m testing with a directory that doesn’t have an index.cfm or index.lucee. (or index.anything)

I also have the Search Friendly URLs filter in there to preserve that behavior.

On Fri, Jul 22, 2016 at 8:44 AM, Harry Klein <@Harry_Kleinmailto:Harry_Klein> wrote:
Yes this change will always list directories, even if index.cfm exists. Which is fine for me in development.
Unfortunately I am not aware of a more “intelligent” solution which only lists directories if the defined “welcome-file” is not found.

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.commailto:lucee@googlegroups.com [mailto:lucee@googlegroups.commailto:lucee@googlegroups.com] Im Auftrag von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:41
An: lucee@googlegroups.commailto:lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

And that fixed it. But to be clear, that ‘feels’ wrong to me. What I mean is, given a request to /, I’d want Lucee to load index.cfm/index.html if it exists, and if not, show a listing. Does this change break that?

On Fri, Jul 22, 2016 at 7:38 AM, Harry Klein <@Harry_Kleinmailto:Harry_Klein> wrote:

Did you deactivate/change the welcome-file-list in conf/web.xml too?

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.commailto:lucee@googlegroups.com [mailto:lucee@googlegroups.commailto:lucee@googlegroups.com] Im Auftrag
von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:26
An: lucee@googlegroups.commailto:lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

No go. I even tried adding default:

(As an aside, docBase does nothing either, but one problem at a time.
:wink:

On Thu, Jul 21, 2016 at 9:26 PM, Joseph Gooch <@Joseph_Goochmailto:Joseph_Gooch> wrote:

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO
type things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:
openbd-core/src/com/newatlanta at master · OpenBD/openbd-core · GitHub
f ilters/SearchEngineFriendlyURLFilter.java


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee%2Bunsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAK2avF8dGuS7w2xhAeLKvYwpa-HkbyKPUqLmN2i5Z2-GQDejmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to a topic in the Google Groups “Lucee” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/ivoCv0Hn4dM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+unsubscribe@googlegroups.commailto:lucee%2Bunsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/683ca7f10b994d1c81cd9288222f0da0%40srv-dc3.contens.local.
For more options, visit https://groups.google.com/d/optout.

Raymond Camden, Developer Advocate for StrongLoop at IBM

Email : @Raymond_Camdenmailto:Raymond_Camden
Blog : www.raymondcamden.comhttp://www.raymondcamden.com
Twitter: raymondcamden


Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee%2Bunsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAK2avF8w9APBXkeTbs9ChSmdEjKZOsjougfDqrPo0cQBBxnNMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee%2Bunsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/bbaa9dc2b5d841cea95439b6c71cf177%40srv-dc3.contens.local.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAKY58c5FZ771GG3Vz8%2BpRfLO3SMB5pZRRnvegdmpvb079HU8nA%40mail.gmail.comhttps://groups.google.com/d/msgid/lucee/CAKY58c5FZ771GG3Vz8%2BpRfLO3SMB5pZRRnvegdmpvb079HU8nA%40mail.gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO type
things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:

-GOn Wednesday, July 20, 2016 at 6:27:24 PM UTC-4, Raymond Camden wrote:

I’m trying to do this now with Lucee 5 Express - any clue as to actually
use how to use the attribute? I can’t find this as an existing setting
anywhere.

On Monday, February 23, 2015 at 5:39:01 PM UTC-6, Jordan Michaels wrote:

https://tomcat.apache.org/tomcat-7.0-doc/config/context.html

Use the “resourceOnlyServlets” attribute.

Warm Regards,
Jordan Michaels

On 02/23/2015 03:00 PM, DMan wrote:

Nope nothing, a vanilla Lucee install with just a couple of vhosts in
server.xml

And that fixed it. But to be clear, that ‘feels’ wrong to me. What I
mean is, given a request to /, I’d want Lucee to load
index.cfm/index.html if it exists, and if not, show a listing. Does
this change break that?On Fri, Jul 22, 2016 at 7:38 AM, Harry Klein <@Harry_Klein> wrote:

Did you deactivate/change the welcome-file-list in conf/web.xml too?

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:26
An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

No go. I even tried adding default:

(As an aside, docBase does nothing either, but one problem at a time. :wink:

On Thu, Jul 21, 2016 at 9:26 PM, Joseph Gooch <@Joseph_Gooch> wrote:

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO
type things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:
https://github.com/OpenBD/openbd-core/blob/master/src/com/newatlanta/f
ilters/SearchEngineFriendlyURLFilter.java


Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAK2avF8dGuS7w2xhAeLKvYwpa-HkbyKPUqLmN2i5Z2-GQDejmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to a topic in the Google Groups “Lucee” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/ivoCv0Hn4dM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/683ca7f10b994d1c81cd9288222f0da0%40srv-dc3.contens.local.
For more options, visit https://groups.google.com/d/optout.

Raymond Camden, Developer Advocate for StrongLoop at IBM

Email : @Raymond_Camden
Blog : www.raymondcamden.com
Twitter: raymondcamden

So to summarize what I’ve seen for posterity :slight_smile:

Options are:

  1. Set listings=true in the defaultservlet. Remove index.cfm (and
    index.lucee) from welcome-files. This gives directory listings, but
    doesn’t auto-load index.cfm files. index.cfm/anypath type links should
    still work.
  2. Set listings=true in the defaultservlet. set resourceOnlyServlets to
    LuceeServlet,CFMLServlet. Implement another solution for SES urls -
    tuckey’s urlrewrite or OpenBD’s SES filter or something else.
  3. Write your own directory listing support via onMissingMethod in
    Application.cfc

Arguably, this should probably be easier out of the box with Lucee Express
:slight_smile: I’ll submit a JIRA. It might be worth including the tuckey urlrewrite
filter in lucee express as it has other benefits/potential use cases.

-GOn Fri, Jul 22, 2016 at 8:48 AM, Joseph Gooch <@Joseph_Gooch> wrote:

Having to remove it from welcome-files is the behavior that
resourceOnlyServlets should fix…

Here’s my context.xml (copied to ROOT.xml) and web.xml for comparison

I’m testing with a directory that doesn’t have an index.cfm or
index.lucee. (or index.anything)

I also have the Search Friendly URLs filter in there to preserve that
behavior.

On Fri, Jul 22, 2016 at 8:44 AM, Harry Klein <@Harry_Klein> wrote:

Yes this change will always list directories, even if index.cfm exists.
Which is fine for me in development.
Unfortunately I am not aware of a more “intelligent” solution which only
lists directories if the defined “welcome-file” is not found.

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag
von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:41
An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

And that fixed it. But to be clear, that ‘feels’ wrong to me. What I mean
is, given a request to /, I’d want Lucee to load index.cfm/index.html if
it exists
, and if not, show a listing. Does this change break that?

On Fri, Jul 22, 2016 at 7:38 AM, Harry Klein <@Harry_Klein> wrote:

Did you deactivate/change the welcome-file-list in conf/web.xml too?

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag
von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:26
An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

No go. I even tried adding default:

(As an aside, docBase does nothing either, but one problem at a time.
:wink:

On Thu, Jul 21, 2016 at 9:26 PM, Joseph Gooch <@Joseph_Gooch> wrote:

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO
type things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:
openbd-core/src/com/newatlanta at master · OpenBD/openbd-core · GitHub
f ilters/SearchEngineFriendlyURLFilter.java


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAK2avF8dGuS7w2xhAeLKvYwpa-HkbyKPUqLmN2i5Z2-GQDejmA%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to a topic in the
Google Groups “Lucee” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/lucee/ivoCv0Hn4dM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/683ca7f10b994d1c81cd9288222f0da0%40srv-dc3.contens.local
.
For more options, visit https://groups.google.com/d/optout.

===========================================================================
Raymond Camden, Developer Advocate for StrongLoop at IBM

Email : @Raymond_Camden
Blog : www.raymondcamden.com
Twitter: raymondcamden


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAK2avF8w9APBXkeTbs9ChSmdEjKZOsjougfDqrPo0cQBBxnNMQ%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/bbaa9dc2b5d841cea95439b6c71cf177%40srv-dc3.contens.local
.
For more options, visit https://groups.google.com/d/optout.

I added resourceOnlyServlets in „conf/context.xml“ – is this the right place?

-HarryVon: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von Joseph Gooch
Gesendet: Freitag, 22. Juli 2016 18:55
An: lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

Interesting, it didn’t seem to work for Raymond either. You did the resourceOnlyServlets in conf/context.xml (or conf/Catalina/localhost/ROOT.xml)?

Not sure why it’s working for me. Is there something else different in my files vs yours?

SearchEngineFriendlyURLFilter is only necessary for SES urls. (i.e. /index.cfm/this/is/a/website) Because no file named website in a path called /index.cfm/this/is/a/ exists. (so resourceOnlyServlets will prevent the mapping from being issued against CFMLServlet)

The filter internally rewrites the above request as /index.cfm with a PATH_INFO of /this/is/a/website before mappings occur.

-G

On Fri, Jul 22, 2016 at 9:15 AM, Harry Klein <@Harry_Kleinmailto:Harry_Klein> wrote:
Thanks Joseph, I never heard about „resourceOnlyServlets“.
I tried approach 2) but it didn’t work for me – is the SearchEngineFriendlyURLFilter required?

The only changes I did:
resourceOnlyServlets=“CFMLServlet” (I deactivated the Lucee servlet)
and
uncomment the welcome-files.

-Harry

Von: lucee@googlegroups.commailto:lucee@googlegroups.com [mailto:lucee@googlegroups.commailto:lucee@googlegroups.com] Im Auftrag von Joseph Gooch
Gesendet: Freitag, 22. Juli 2016 15:10

An: lucee@googlegroups.commailto:lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

So to summarize what I’ve seen for posterity :slight_smile:

Options are:

  1. Set listings=true in the defaultservlet. Remove index.cfm (and index.lucee) from welcome-files. This gives directory listings, but doesn’t auto-load index.cfm files. index.cfm/anypath type links should still work.
  2. Set listings=true in the defaultservlet. set resourceOnlyServlets to LuceeServlet,CFMLServlet. Implement another solution for SES urls - tuckey’s urlrewrite or OpenBD’s SES filter or something else.
  3. Write your own directory listing support via onMissingMethod in Application.cfc

Arguably, this should probably be easier out of the box with Lucee Express :slight_smile: I’ll submit a JIRA. It might be worth including the tuckey urlrewrite filter in lucee express as it has other benefits/potential use cases.

-G

On Fri, Jul 22, 2016 at 8:48 AM, Joseph Gooch <@Joseph_Goochmailto:Joseph_Gooch> wrote:
Having to remove it from welcome-files is the behavior that resourceOnlyServlets should fix…

Here’s my context.xml (copied to ROOT.xml) and web.xml for comparison

I’m testing with a directory that doesn’t have an index.cfm or index.lucee. (or index.anything)

I also have the Search Friendly URLs filter in there to preserve that behavior.

On Fri, Jul 22, 2016 at 8:44 AM, Harry Klein <@Harry_Kleinmailto:Harry_Klein> wrote:
Yes this change will always list directories, even if index.cfm exists. Which is fine for me in development.
Unfortunately I am not aware of a more “intelligent” solution which only lists directories if the defined “welcome-file” is not found.

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.commailto:lucee@googlegroups.com [mailto:lucee@googlegroups.commailto:lucee@googlegroups.com] Im Auftrag von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:41
An: lucee@googlegroups.commailto:lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

And that fixed it. But to be clear, that ‘feels’ wrong to me. What I mean is, given a request to /, I’d want Lucee to load index.cfm/index.html if it exists, and if not, show a listing. Does this change break that?

On Fri, Jul 22, 2016 at 7:38 AM, Harry Klein <@Harry_Kleinmailto:Harry_Klein> wrote:

Did you deactivate/change the welcome-file-list in conf/web.xml too?

-Harry

-----Ursprüngliche Nachricht-----
Von: lucee@googlegroups.commailto:lucee@googlegroups.com [mailto:lucee@googlegroups.commailto:lucee@googlegroups.com] Im Auftrag
von Raymond Camden
Gesendet: Freitag, 22. Juli 2016 14:26
An: lucee@googlegroups.commailto:lucee@googlegroups.com
Betreff: Re: [Lucee] display directory contents instead of error

No go. I even tried adding default:

(As an aside, docBase does nothing either, but one problem at a time.
:wink:

On Thu, Jul 21, 2016 at 9:26 PM, Joseph Gooch <@Joseph_Goochmailto:Joseph_Gooch> wrote:

Modify the listings param for defaultservlet in conf/web.xml to true
Modify conf/context.xml

(Note those are the servlet names from conf/web.xml)

That will probably do it for you… I got a directory index on mine.

However… It also breaks virtual url type things and CGI.PATH_INFO
type things.

i.e. I don’t think /index.cfm/some/page will work anymore.

To get that back you may want to incorporate something like this:
http://tuckey.org/urlrewrite/

or this filter:
openbd-core/src/com/newatlanta at master · OpenBD/openbd-core · GitHub
f ilters/SearchEngineFriendlyURLFilter.java


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee%2Bunsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAK2avF8dGuS7w2xhAeLKvYwpa-HkbyKPUqLmN2i5Z2-GQDejmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
CFCamp 2016

You received this message because you are subscribed to a topic in the Google Groups “Lucee” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/ivoCv0Hn4dM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+unsubscribe@googlegroups.commailto:lucee%2Bunsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/683ca7f10b994d1c81cd9288222f0da0%40srv-dc3.contens.local.
For more options, visit https://groups.google.com/d/optout.

Raymond Camden, Developer Advocate for StrongLoop at IBM

Email : @Raymond_Camdenmailto:Raymond_Camden
Blog : www.raymondcamden.comhttp://www.raymondcamden.com
Twitter: raymondcamden


Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee%2Bunsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAK2avF8w9APBXkeTbs9ChSmdEjKZOsjougfDqrPo0cQBBxnNMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee%2Bunsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/bbaa9dc2b5d841cea95439b6c71cf177%40srv-dc3.contens.local.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAKY58c5FZ771GG3Vz8%2BpRfLO3SMB5pZRRnvegdmpvb079HU8nA%40mail.gmail.comhttps://groups.google.com/d/msgid/lucee/CAKY58c5FZ771GG3Vz8%2BpRfLO3SMB5pZRRnvegdmpvb079HU8nA%40mail.gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/56ed73fd39914b569585ff8d33666fa7%40srv-dc3.contens.localhttps://groups.google.com/d/msgid/lucee/56ed73fd39914b569585ff8d33666fa7%40srv-dc3.contens.local?utm_medium=email&utm_source=footer.

For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAKY58c4RP5Y7uBAXfWPpfRWrCZhqV%3D7%3DkSB%3D8agCDmZO2J%3D1jg%40mail.gmail.comhttps://groups.google.com/d/msgid/lucee/CAKY58c4RP5Y7uBAXfWPpfRWrCZhqV%3D7%3DkSB%3D8agCDmZO2J%3D1jg%40mail.gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.