Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Dealing with application names in a JEE web app Date: Mon, 23 May 2011 13:10:34 -0700 Organization: A noiseless patient Spider Lines: 70 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 23 May 2011 20:10:44 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="8FmyTa30jaHydmbsw/NXBQ"; logging-data="27052"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RskACHxlEj1EOpcFDzJa+1luwTx5dR48=" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: Cancel-Lock: sha1:GGgLSWd0dIiaaub2DGBcHYXJ6V4= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4491 On 5/23/2011 12:30 PM, Lew wrote: > On 05/23/2011 03:11 PM, markspace wrote: >> So how do folks write their apps so that they can handle being >> deployed under >> different names? > Relative URLS. I found a use-case where this doesn't work. Templates are used by various other pages in the web app. They have a static location, but their links are processed as if the template's "location" in the directory hierarchy was the location of the template client. Example: I have a template at /rsrc/priv/lnf-template.xhtml which includes other resources. Abbreviated example: <ui:insert name="title"> Facelets Template </ui:insert> ... That link href to the style sheet is processed by the client, but the client could be any page in the directory hierarchy. For example for a client from the root directory (/readPost.xhtml), that relative link in the template doesn't work. Hello from Facelets Pretty ugly, if you ask me.