On Mon, Feb 28, 2011 at 11:17 AM, Alan Holden <[email protected]> wrote:

>  I've never launched Tomcat that way. I thought only Jetty was launched
> that way.
> Furthering the theory that I am - quite possibly - the list idiot.
> Al


Every list needs one! ;-) Totally kidding--I had some really great
conversations with Alan in person at OpenCF Summit. Always great to meet
someone in person so you can hear the tone and personality in their emails.

Just to chime in I don't think (and I could be totally wrong on this) that
you're really meant to do more advanced configuration when you're launching
things from Eclipse. And even if you have Tomcat on your machine and you
point Eclipse to that, it's still a bit of a different beast than running
Tomcat's startup script since, at least in my experience, it's more or less
using the guts of Tomcat but it's not reading your Tomcat config files and
operating in the same way as if you launch it outside Eclipse, if that makes
sense.

So getting to the point where you can launch Tomcat from within Eclipse and
eliminate the context path ... not sure that's really doable, or at least
I've never bothered looking into it to see if it's doable.

This brings up a good point though--if you're concerned about context path
vs. no context path, you can write your code in such a way that it will take
one into account if it's present or not if there isn't one. You can do a
check with a bit of Java (getPageContext().getRequest().getContextPath()) or
use CFBASE to handle it:
http://openbluedragon.org/manual/?/tag/CFBASE

And bear in mind this only effects what I call "front end code," meaning
things on your view pages like paths to images, javascript and css files,
etc. To "back end code" (like CreateObject calls and the like), / gets you
*inside* the context path. On the front end, / gets you to the root of
Tomcat, at which point you have to tack on a context path if one's involved.

Hope that sheds a bit of light vs. muddying the waters further.

-- 
Matthew Woodward
[email protected]
http://blog.mattwoodward.com
identi.ca / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint,
etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

-- 
tag/function ref: http://www.openbluedragon.org/manual/
 mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to