Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #4491

Re: Dealing with application names in a JEE web app

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 <iref03$qdc$1@dont-email.me> (permalink)
References <irebhd$16t$1@dont-email.me> <ireckt$6bv$1@news.albasani.net>
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 <ireckt$6bv$1@news.albasani.net>
Cancel-Lock sha1:GGgLSWd0dIiaaub2DGBcHYXJ6V4=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4491

Show key headers only | View raw


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:

<LNF-TEMPLATE.XHTML>

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html">

   <h:head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <link href="../css/style.css" rel="stylesheet" type="text/css" />
     <title>
       <ui:insert name="title">
         Facelets Template
       </ui:insert>
     </title>
   </h:head>

   <h:body>
  ...
</LNF-TEMPLATE.XHTML>

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.

<READPOST.XHTML>

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:ui="http://java.sun.com/jsf/facelets">

   <h:body>
     <ui:composition template="/rsrc/priv/lnf-template.xhtml" >
       Hello from Facelets
     </ui:composition>
   </h:body>

</html>

</READPOST.XHTML>


Pretty ugly, if you ask me.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Dealing with application names in a JEE web app markspace <-@.> - 2011-05-23 12:11 -0700
  Re: Dealing with application names in a JEE web app Lew <noone@lewscanon.com> - 2011-05-23 15:30 -0400
    Re: Dealing with application names in a JEE web app markspace <-@.> - 2011-05-23 12:41 -0700
    Re: Dealing with application names in a JEE web app markspace <-@.> - 2011-05-23 13:10 -0700
      Re: Dealing with application names in a JEE web app Lew <noone@lewscanon.com> - 2011-05-23 17:02 -0400
        Re: Dealing with application names in a JEE web app jebblue <n@n.nnn> - 2011-05-23 19:30 -0500
          Re: Dealing with application names in a JEE web app Lew <noone@lewscanon.com> - 2011-05-23 21:13 -0400
        Re: Dealing with application names in a JEE web app markspace <-@.> - 2011-05-24 09:32 -0700
  Re: Dealing with application names in a JEE web app Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-05-23 19:01 -0300
  Re: Dealing with application names in a JEE web app Owen Jacobson <angrybaldguy@gmail.com> - 2011-05-23 23:20 -0400
  Re: Dealing with application names in a JEE web app Tom Anderson <twic@urchin.earth.li> - 2011-05-24 18:16 +0100
    Re: Dealing with application names in a JEE web app markspace <-@.> - 2011-05-25 12:16 -0700
      Re: Dealing with application names in a JEE web app markspace <-@.> - 2011-05-25 16:40 -0700
      Re: Dealing with application names in a JEE web app Tom Anderson <twic@urchin.earth.li> - 2011-05-26 18:07 +0100
        Re: Dealing with application names in a JEE web app Lew <noone@lewscanon.com> - 2011-05-26 13:25 -0400
          Re: Dealing with application names in a JEE web app markspace <-@.> - 2011-05-26 12:57 -0700
            Re: Dealing with application names in a JEE web app Lew <noone@lewscanon.com> - 2011-05-26 19:39 -0400
              Re: Dealing with application names in a JEE web app Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-05-27 07:31 -0300
                Re: Dealing with application names in a JEE web app Lew <noone@lewscanon.com> - 2011-05-27 10:14 -0400
        Re: Dealing with application names in a JEE web app markspace <-@.> - 2011-05-26 12:51 -0700
        Re: Dealing with application names in a JEE web app Steve Sobol <sjsobol@JustThe.net> - 2011-05-26 14:51 -0700

csiph-web