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
Options are:
- 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.
- 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.
- Write your own directory listing support via onMissingMethod in Application.cfc
Arguably, this should probably be easier out of the box with Lucee Express 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.
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
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.