SV: Relative paths & Clay
Hi By the way, there is a Tomahawk sandbox component for the link (tx:link?). Hermod -Opprinnelig melding- Fra: Richard Eggert [mailto:[EMAIL PROTECTED] Sendt: 23. februar 2007 16:19 Til: user@shale.apache.org Emne: RE: Relative paths & Clay Thanks. Those ideas worked great. Here's what I ended up doing to make them reusable: Rich Eggert Member of Technical Staff Proteus Technologies, LLC http://www.proteus-technologies.com -Original Message- From: Gary VanMatre [mailto:[EMAIL PROTECTED] Sent: Thu 2/22/2007 5:48 PM To: user@shale.apache.org Subject: Re: Relative paths & Clay >From: "Richard Eggert" <[EMAIL PROTECTED]> > > I've run into a very basic problem using Clay that I'm not sure how to solve. > > Here's the setup: > > I have a JSP file (we'll call it page.jsp) that contains a single tag > that points to an HTML template in a subdirectory (we'll call it > /templates/blah/foo.html). The HTML template references an image file in a > completely different directory (/images/bar.jpg). > > How do I get the image to display properly both when rendered by Clay and when > just loaded as a mockup? > > When loaded through the JSP using Clay, the image file's relative path is > images/bar.jpg. However, when the HTML is loaded directly with a browser either > online or offline, the image file's relative path is instead > ../../images/bar.jpg. > > Using the absolute path (/appName/images/bar.jpg) works for both forms of online > viewing (via JSP and as mockup), but it doesn't work for offline viewing (since > the absolute path then becomes /full/filesystem/path/to/appName/images/bar.jpg), > and I'd also rather not hard-code my application's context root into my HTML. > > I thought of using a tag with jsfid="void", but that doesn't work, since > only accepts full URL's and not relative paths. > > Does anyone know of a way around this? > You might try something like this: > Incidentally, the same issue arises with links to stylesheets. > You would be better off looking for a component, but something like this might work too: Another option would be to use the comment blocks to remove the CSS used for developement. > > Rich Eggert > Member of Technical Staff > Proteus Technologies, LLC > http://www.proteus-technologies.com > > Gary
RE: Relative paths & Clay
Thanks. Those ideas worked great. Here's what I ended up doing to make them reusable: Rich Eggert Member of Technical Staff Proteus Technologies, LLC http://www.proteus-technologies.com -Original Message- From: Gary VanMatre [mailto:[EMAIL PROTECTED] Sent: Thu 2/22/2007 5:48 PM To: user@shale.apache.org Subject: Re: Relative paths & Clay >From: "Richard Eggert" <[EMAIL PROTECTED]> > > I've run into a very basic problem using Clay that I'm not sure how to solve. > > Here's the setup: > > I have a JSP file (we'll call it page.jsp) that contains a single tag > that points to an HTML template in a subdirectory (we'll call it > /templates/blah/foo.html). The HTML template references an image file in a > completely different directory (/images/bar.jpg). > > How do I get the image to display properly both when rendered by Clay and > when > just loaded as a mockup? > > When loaded through the JSP using Clay, the image file's relative path is > images/bar.jpg. However, when the HTML is loaded directly with a browser > either > online or offline, the image file's relative path is instead > ../../images/bar.jpg. > > Using the absolute path (/appName/images/bar.jpg) works for both forms of > online > viewing (via JSP and as mockup), but it doesn't work for offline viewing > (since > the absolute path then becomes > /full/filesystem/path/to/appName/images/bar.jpg), > and I'd also rather not hard-code my application's context root into my HTML. > > I thought of using a tag with jsfid="void", but that doesn't work, since > only accepts full URL's and not relative paths. > > Does anyone know of a way around this? > You might try something like this: > Incidentally, the same issue arises with links to stylesheets. > You would be better off looking for a component, but something like this might work too: Another option would be to use the comment blocks to remove the CSS used for developement. > > Rich Eggert > Member of Technical Staff > Proteus Technologies, LLC > http://www.proteus-technologies.com > > Gary
Re: Relative paths & Clay
>From: "Richard Eggert" <[EMAIL PROTECTED]> > > I've run into a very basic problem using Clay that I'm not sure how to solve. > > Here's the setup: > > I have a JSP file (we'll call it page.jsp) that contains a single tag > that points to an HTML template in a subdirectory (we'll call it > /templates/blah/foo.html). The HTML template references an image file in a > completely different directory (/images/bar.jpg). > > How do I get the image to display properly both when rendered by Clay and > when > just loaded as a mockup? > > When loaded through the JSP using Clay, the image file's relative path is > images/bar.jpg. However, when the HTML is loaded directly with a browser > either > online or offline, the image file's relative path is instead > ../../images/bar.jpg. > > Using the absolute path (/appName/images/bar.jpg) works for both forms of > online > viewing (via JSP and as mockup), but it doesn't work for offline viewing > (since > the absolute path then becomes > /full/filesystem/path/to/appName/images/bar.jpg), > and I'd also rather not hard-code my application's context root into my HTML. > > I thought of using a tag with jsfid="void", but that doesn't work, since > only accepts full URL's and not relative paths. > > Does anyone know of a way around this? > You might try something like this: > Incidentally, the same issue arises with links to stylesheets. > You would be better off looking for a component, but something like this might work too: Another option would be to use the comment blocks to remove the CSS used for developement. > > Rich Eggert > Member of Technical Staff > Proteus Technologies, LLC > http://www.proteus-technologies.com > > Gary
SV: Relative paths & Clay
Hi Short answer: You don't. What I do is add a duplicate entry around such stuff using the Clay html remove stuff What comes here will be removed by clay, but displayed by a browser Hermod -Opprinnelig melding- Fra: Richard Eggert [mailto:[EMAIL PROTECTED] Sendt: 22. februar 2007 22:30 Til: user@shale.apache.org Emne: Relative paths & Clay I've run into a very basic problem using Clay that I'm not sure how to solve. Here's the setup: I have a JSP file (we'll call it page.jsp) that contains a single tag that points to an HTML template in a subdirectory (we'll call it /templates/blah/foo.html). The HTML template references an image file in a completely different directory (/images/bar.jpg). How do I get the image to display properly both when rendered by Clay and when just loaded as a mockup? When loaded through the JSP using Clay, the image file's relative path is images/bar.jpg. However, when the HTML is loaded directly with a browser either online or offline, the image file's relative path is instead ../../images/bar.jpg. Using the absolute path (/appName/images/bar.jpg) works for both forms of online viewing (via JSP and as mockup), but it doesn't work for offline viewing (since the absolute path then becomes /full/filesystem/path/to/appName/images/bar.jpg), and I'd also rather not hard-code my application's context root into my HTML. I thought of using a tag with jsfid="void", but that doesn't work, since only accepts full URL's and not relative paths. Does anyone know of a way around this? Incidentally, the same issue arises with links to stylesheets. Rich Eggert Member of Technical Staff Proteus Technologies, LLC http://www.proteus-technologies.com
Relative paths & Clay
I've run into a very basic problem using Clay that I'm not sure how to solve. Here's the setup: I have a JSP file (we'll call it page.jsp) that contains a single tag that points to an HTML template in a subdirectory (we'll call it /templates/blah/foo.html). The HTML template references an image file in a completely different directory (/images/bar.jpg). How do I get the image to display properly both when rendered by Clay and when just loaded as a mockup? When loaded through the JSP using Clay, the image file's relative path is images/bar.jpg. However, when the HTML is loaded directly with a browser either online or offline, the image file's relative path is instead ../../images/bar.jpg. Using the absolute path (/appName/images/bar.jpg) works for both forms of online viewing (via JSP and as mockup), but it doesn't work for offline viewing (since the absolute path then becomes /full/filesystem/path/to/appName/images/bar.jpg), and I'd also rather not hard-code my application's context root into my HTML. I thought of using a tag with jsfid="void", but that doesn't work, since only accepts full URL's and not relative paths. Does anyone know of a way around this? Incidentally, the same issue arises with links to stylesheets. Rich Eggert Member of Technical Staff Proteus Technologies, LLC http://www.proteus-technologies.com