Just wanted to say that I really, really, really wanted Tapestry URLs to be pretty, but it just doesn't work ... unless we through the WYSIWYG aspect out the door!
Another option, which I'm a little loath to get into, is to identify relative URLs in the HTML template and convert them to absolute URLs dynamically. This allows the template to live in the context root with relative URLs to assets under the context root but at runtime, the relative URLs become complete URLs (well, technically, URIs). That is, <img src="images/button.gif"/> Would be translate to: <img src="/context-name/images/button.gif"/> Where /context-name is determined at runtime. What the hell, might as well localize it on the fly, too: <img src="/context-name/images/button_de.gif"/> Again, the downside is accurately locating these URLs in the HTML template; they show up in various tags, in stylesheets ... and in JavaScript! So its not trivial, but probably should be examined! And ... once you've done all that, you still wouldn't want to hack the URL with any expectation of getting anything but the exception page ... -- [EMAIL PROTECTED] http://tapestry.sf.net > Howard, thanks for the resonse, and I will think on > this. > > Scot > > > --- [EMAIL PROTECTED] wrote: > > Encoding information in the path info was, in fact, > > the way Tapestry originally > > operated. > > > > It has a few defects. > > > > As you wander the application, your base URL (used, > > by the client browser, to > > calculate relative URLs) varies considerably ... > > this is especially bad in > > Tapestry, because the number of "terms" in the path > > info varies depending on > > service. > > > > The end result is that you have to use absolute, not > > relative, paths to all > > your static resources (images, stylesheets, etc.). > > > > Worse, the first "term" in the URL is "/context" (as > > in "/context/servlet? > > service=...."). This is variable depending on > > deployment, so you end up in a > > situtation where your implementation mandates a > > deployment detail that is > > supposed to be variable. > > > > That's why Sun (in model 1 and 2) strongly suggests > > that you always use > > relative URLs to assets. > > > > -- > > [EMAIL PROTECTED] > > > > http://tapestry.sf.net > > > Howard, > > > > > > I have an idea for the URL's that you could > > probably > > > either confirm or shoot down pretty quickly. > > > > > > What about the way Amazon does it? Of course I > > don't > > > understand all the details, but here are some > > basics: > > > > > > 1. Here is a pretty URL that goes to a unique > > page, > > > but is stateless > > > http://www.amazon.com/exec/obidos/ASIN/0618260587 > > > > > > 2. One a person goes to that page, state is added > > > automatically so taht it looks like > > > > > > http://www.amazon.com/exec/obidos/ASIN/0618260587/102-3321578-2400930 > > > > > > 3. The URL actually contains state, but without > > using > > > the querystring indicator, i.e. "?" > > > > > > Now, there are two key points about this form of > > URL. > > > A) It looks like a stateless URL so all search > > engines > > > will crawl it and record it. B) > > > > > > 4. If someone else was to go to Amazon using the > > URL > > > in #2 above, it would be silently converted to > > > represent their session with Amazon, not mine. In > > > other words, the part of the URL that has state > > would > > > cause an internal Tapestry exception, since it > > would > > > be invalid. Then Tapestry would create a new > > session > > > (Visit) and attach it to the end of the URL. > > > > > > Now, as I see it, there are two very important > > > objectives Amazon has achieved by using this form > > of > > > URL. > > > > > > 1. There is no query string (i.e. "?") indicator. > > > This means that all search engines will now be > > able to > > > catalog my site. In e-commerce, this is > > absolutely > > > essential. > > > > > > 2. I can send this URL to someone else, or > > bookmark > > > it, and it will still work. Again, this is > > essential > > > for e-commerce. > > > > > > Now, on the downside, I admit that the URL is not > > > pretty in the sense that it is hierarchical, but > > it > > > would at least achieve two of the three goals. > > > > > > Also, please know that I have not developed any > > > Tapestry applications. I have just completed my > > first > > > read-through of the developers guide, and will > > start > > > later this month. > > > > > > Thanks for your consideration, > > > Scot > > > > > > > > > --- "Andrew C. Oliver" <[EMAIL PROTECTED]> > > wrote: > > > > I understand. I just suggest people do care > > about > > > > such things. Myself > > > > included. That is all. > > > > > > > > -Andy > > > > > > > > Howard M. Lewis Ship wrote: > > > > > > > > >So far, it's been either pretty URLs or > > templates > > > > that work in WYSIWYG > > > > >editors; I haven't found a way (even using the > > > > <base> tag) to have it both > > > > >ways. Every time I change to long URLs, > > encoding > > > > all the information in the > > > > >path info instead of in query parameters, > > something > > > > important breaks for > > > > >somebody. In addition, the way service > > parameters > > > > are encoded now (as > > > > >objects encoded as strings, rather than just > > > > strings) is somewhat reliant on > > > > >using query parameters. > > > > > > > > > > > > > > >----- Original Message ----- > > > > >From: "Andrew C. Oliver" <[EMAIL PROTECTED]> > > > > >To: <[EMAIL PROTECTED]> > > > > >Cc: "Tapestry Contrib" > > > > <[EMAIL PROTECTED]> > > > > >Sent: Wednesday, December 18, 2002 10:34 AM > > > > >Subject: Re: [Tapestry-contrib] Fwd: Re: > > > > [Tapestry-developer] Tapestry and > > > > >RSS > > > > > > > > > > > > > > > > > > > > > > > > >>While I don't think my opinion should count > > for > > > > much on this. I am in > > > > >>the URL control crowd. > > > > >>Take a look at what Cocoon does with its > > sitemap > > > > (xml.apache.org/cocoon). > > > > >> > > > > >>URLs are pretty important in some companies > > and > > > > Can be a powerful tool > > > > >>for usability. > > > > >> > > > > >>-Andy > > > > >> > > > > >>[EMAIL PROTECTED] wrote: > > > > >> > > > > >> > > > > >> > > > > >>>i'm reposting this, as it never made it to > > the > > > > list :) > > > > >>> > > > > >>> > > > > >>>On Fri, 13 Dec 2002 16:46:12 -0500, > > > > [EMAIL PROTECTED] said: > > > > >>> > > > > >>> > > > > >>> > > > > >>> > > > > >>>>hi, > > > > >>>> > > > > >>>>i don't know if i count as a "user" but i do > > > > like short urls, that tell > > > > >>>>about the structure of a site's information. > > i > > > > like it when i can easily > > > > >>>>navigate around if i get a 404 (ok, linkrot > > is > > > > bad too, but it's a fact > > > > >>>>of life). or jump straight to something i > > know > > > > is there, but have not > > > > >>>>bookmarked it (eg. i can jump to the javadoc > > of > > > > java.lang.String without > > > > >>>>having it bookmarked, or even bringing up > > the > > > === message truncated === > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com ------------------------------------------------------- This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ _______________________________________________ Tapestry-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/tapestry-developer
