SES URLs below web root...

220 views
Skip to first unread message

Brad

unread,
Aug 19, 2015, 11:56:30 AM8/19/15
to Lucee
http://mysite.com/index.cfm/Main

Works fine...

http://mysite.com/someSubdirectory/index.cfm/Main

Doesn't work, Tomcat returns a 404.

Is the only way to fix this to add a mapping to that index.cfm in web.xml inside Tomcat?

<url-pattern>/someSubdirectory/index.cfm/*</url-pattern>

If so, does it have to be added to the main web.xml for Tomcat or is there somewhere more site specific it can reside?

Thanks!

Jordan Michaels

unread,
Aug 19, 2015, 2:35:17 PM8/19/15
to lu...@googlegroups.com
> Is the only way to fix this to add a mapping to that index.cfm in web.xml
> inside Tomcat?

Yep - in Tomcat anyway. Tomcat doesn't support double wildcards, IE:

<url-pattern>/*index.cfm/*</url-pattern>

> is there somewhere more site specific it can reside?

Yep. You can add it to the web.xml file in the WEB-INF directory for that site.

Another idea would be to remove index.cfm all together, and just do a directory mapping using a URL-Rewrite on the web server.

Kind regards,
Jordan Michaels
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
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.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/369a1a0e-9af9-4a4e-8199-2656f0642d3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted
Message has been deleted

Jordan Michaels

unread,
Aug 25, 2015, 3:20:46 PM8/25/15
to lu...@googlegroups.com
Hi Brad,

Apologies for the delayed response. I was out of town for the last 4 days.

Basically, the URI needs to contain some kind of 'key' that Tomcat can use to know how to pass the request off to the correct servlet. Some successful SES implementations I've seen rewrite all requests to a single index.cfm file, which then routes the response to that request using code - FW/1, Mura, and Taffy all use this kind of SES mapping.

So a URI of '/someDirectory1/main' would be rewritten to '/index.cfm/someDirectory1/main/' in the web server, which Apache and Tomcat know how to route because it contains the 'key' of index.cfm. The translation of /someDirectory1/main is then handled within the CFML code.

Alternatively, other J2EE servlet engines, like Jetty, *DO* support multiple wildcard mappings (like '/*/index.cfm/*'), but they're less known and it's harder to find support for them then it is for Tomcat, so it depends on how important those various aspects are to you.

Hope this helps.

Kind regards,
Jordan Michaels



----- Original Message -----
From: "Brad" <bfre...@gmail.com>
To: "Lucee" <lu...@googlegroups.com>
Sent: Wednesday, August 19, 2015 6:31:16 PM
Subject: Re: [Lucee] SES URLs below web root...

Jordan, thanks for the reply, I'm having a hard time figuring out a method
that will work for me. I'd like one rule or method that will allow any
subdirectory to use the SES method, as in /someDirectory/index.cfm/main
without having to create a new rule for each one...

I'm using Apache forwarding to Tomcat. I know that the URLs are getting
passed to Tomcat fine, because Tomcat is returning a 404. Is it possible
using UrlRewriteFilter (tuckey.org) to create a single rule that would
work in this situation or is it still a case of needing to add each path as
a rule...
> 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/369a1a0e-9af9-4a4e-8199-2656f0642d3b%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
>

--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
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.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/291600a6-f75c-4412-b3c1-a88ea91fcfc7%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages