RE: Tiles And Images
I think images need to be relative to the stylesheet. Cal -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2003 23:25 To: Struts Users Mailing List Subject: Re: Tiles And Images Hi, everybody. I have my problem solved. The images should be relative to the application root (it is where my mistake was). Nonetheless, if you do not mind, why it does not work at all when I tried to put image in the style sheet: td.bar { background: url('http://localhost:8080/PracticeVersion/article/assets/styles/images/goldbrush.gif'); } and I did the following in my JSP: TD class=bar/TD --- Ruth, Brice [EMAIL PROTECTED] wrote: Just an FYI (and correct me if I'm wrong), but just doing html:base/ will pretty much do what all the stuff you have below there does - what you have in there is the default behavior of the Struts-HTML base tag. Holman, Cal wrote: Try searching the archives this is a common issue. The requests for images are based on where the template tiles is using is located - not the location of the jsp being inserted in the template. One approach is to use the base tag - I do the following to ensure all images and links are rooted at the same level in the application - the root. This is the simplest, but there are other suggestions as well. This line is in the base template - or any template. base href=http://%= request.getServerName()%:%= request.getServerPort()%%=request.getContextPath()%/ Images then are referenced from the root of the web app - this is from the footer jsp img src=web/images/footer/struts-power.gif width=95 height=37 border=0 alt=struts/ My directory structure is App -- web (web stuff) --WEB-INF Others like the WEB-INF capability to protect resources. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 14:42 To: [EMAIL PROTECTED] Subject: Tiles And Images I use tiles and stylesheet to display my web pages. I also try to insert some images in those pages. The tiles work fine. I have header, footer, navbar, content, etc. displayed without problem. But, I am curious to know if anybody has had difficulties in inserting images. I have tried various ways and cannot succeed. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles And Images
Ruth I don't think so. They were thinking of this option. The HTML:BASE renders a base/ tag reference relative to the page request. So if your template is in the app root then the effect is the same. I use templates that are actually in different directories so in order to ensure all relative references are to the root I use the scriplet. Not sure this is a best practice. But I do not need to worry what jsp I am coding on - all references are relative to the root. This simplifies the html and if I reorganize the site there are no links/img changes necessary. It does make IDE rendering harder since they typically do best with relative urls and no base tag. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2003 18:59 To: Struts Users Mailing List Subject: Re: Tiles And Images Just an FYI (and correct me if I'm wrong), but just doing html:base/ will pretty much do what all the stuff you have below there does - what you have in there is the default behavior of the Struts-HTML base tag. Holman, Cal wrote: Try searching the archives this is a common issue. The requests for images are based on where the template tiles is using is located - not the location of the jsp being inserted in the template. One approach is to use the base tag - I do the following to ensure all images and links are rooted at the same level in the application - the root. This is the simplest, but there are other suggestions as well. This line is in the base template - or any template. base href=http://%= request.getServerName()%:%= request.getServerPort()%%=request.getContextPath()%/ Images then are referenced from the root of the web app - this is from the footer jsp img src=web/images/footer/struts-power.gif width=95 height=37 border=0 alt=struts/ My directory structure is App -- web (web stuff) --WEB-INF Others like the WEB-INF capability to protect resources. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 14:42 To: [EMAIL PROTECTED] Subject: Tiles And Images I use tiles and stylesheet to display my web pages. I also try to insert some images in those pages. The tiles work fine. I have header, footer, navbar, content, etc. displayed without problem. But, I am curious to know if anybody has had difficulties in inserting images. I have tried various ways and cannot succeed. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles And Images
Using the html:base/ tag is powerful, though, as it allows you to use relative (to page) references for links/images/etc. - if needed, and module relative references are still supported by html:img .../, html:rewrite .../, and of course, html:link .../html:link tags. That's how our application is structured - this way, when we put things in different directories, and each of those directories has its own images directory, so we can use the same tile or JSP in each of those directories and have them use relative image paths, when necessary (specific to the hierarchy they're in), and *also* use module relative paths by using the other Struts tags. Makes code re-use in HTML a lot more attractive :) Brice Holman, Cal wrote: Ruth I don't think so. They were thinking of this option. The HTML:BASE renders a base/ tag reference relative to the page request. So if your template is in the app root then the effect is the same. I use templates that are actually in different directories so in order to ensure all relative references are to the root I use the scriplet. Not sure this is a best practice. But I do not need to worry what jsp I am coding on - all references are relative to the root. This simplifies the html and if I reorganize the site there are no links/img changes necessary. It does make IDE rendering harder since they typically do best with relative urls and no base tag. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2003 18:59 To: Struts Users Mailing List Subject: Re: Tiles And Images Just an FYI (and correct me if I'm wrong), but just doing html:base/ will pretty much do what all the stuff you have below there does - what you have in there is the default behavior of the Struts-HTML base tag. Holman, Cal wrote: Try searching the archives this is a common issue. The requests for images are based on where the template tiles is using is located - not the location of the jsp being inserted in the template. One approach is to use the base tag - I do the following to ensure all images and links are rooted at the same level in the application - the root. This is the simplest, but there are other suggestions as well. This line is in the base template - or any template. base href=http://%= request.getServerName()%:%= request.getServerPort()%%=request.getContextPath()%/ Images then are referenced from the root of the web app - this is from the footer jsp img src=web/images/footer/struts-power.gif width=95 height=37 border=0 alt=struts/ My directory structure is App -- web (web stuff) --WEB-INF Others like the WEB-INF capability to protect resources. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 14:42 To: [EMAIL PROTECTED] Subject: Tiles And Images I use tiles and stylesheet to display my web pages. I also try to insert some images in those pages. The tiles work fine. I have header, footer, navbar, content, etc. displayed without problem. But, I am curious to know if anybody has had difficulties in inserting images. I have tried various ways and cannot succeed. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments
Re: Tiles And Images
Just an FYI (and correct me if I'm wrong), but just doing html:base/ will pretty much do what all the stuff you have below there does - what you have in there is the default behavior of the Struts-HTML base tag. Holman, Cal wrote: Try searching the archives this is a common issue. The requests for images are based on where the template tiles is using is located - not the location of the jsp being inserted in the template. One approach is to use the base tag - I do the following to ensure all images and links are rooted at the same level in the application - the root. This is the simplest, but there are other suggestions as well. This line is in the base template - or any template. base href=http://%= request.getServerName()%:%= request.getServerPort()%%=request.getContextPath()%/ Images then are referenced from the root of the web app - this is from the footer jsp img src=web/images/footer/struts-power.gif width=95 height=37 border=0 alt=struts/ My directory structure is App -- web (web stuff) --WEB-INF Others like the WEB-INF capability to protect resources. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 14:42 To: [EMAIL PROTECTED] Subject: Tiles And Images I use tiles and stylesheet to display my web pages. I also try to insert some images in those pages. The tiles work fine. I have header, footer, navbar, content, etc. displayed without problem. But, I am curious to know if anybody has had difficulties in inserting images. I have tried various ways and cannot succeed. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles And Images
Hi, everybody. I have my problem solved. The images should be relative to the application root (it is where my mistake was). Nonetheless, if you do not mind, why it does not work at all when I tried to put image in the style sheet: td.bar { background: url('http://localhost:8080/PracticeVersion/article/assets/styles/images/goldbrush.gif'); } and I did the following in my JSP: TD class=bar/TD --- Ruth, Brice [EMAIL PROTECTED] wrote: Just an FYI (and correct me if I'm wrong), but just doing html:base/ will pretty much do what all the stuff you have below there does - what you have in there is the default behavior of the Struts-HTML base tag. Holman, Cal wrote: Try searching the archives this is a common issue. The requests for images are based on where the template tiles is using is located - not the location of the jsp being inserted in the template. One approach is to use the base tag - I do the following to ensure all images and links are rooted at the same level in the application - the root. This is the simplest, but there are other suggestions as well. This line is in the base template - or any template. base href=http://%= request.getServerName()%:%= request.getServerPort()%%=request.getContextPath()%/ Images then are referenced from the root of the web app - this is from the footer jsp img src=web/images/footer/struts-power.gif width=95 height=37 border=0 alt=struts/ My directory structure is App -- web (web stuff) --WEB-INF Others like the WEB-INF capability to protect resources. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 14:42 To: [EMAIL PROTECTED] Subject: Tiles And Images I use tiles and stylesheet to display my web pages. I also try to insert some images in those pages. The tiles work fine. I have header, footer, navbar, content, etc. displayed without problem. But, I am curious to know if anybody has had difficulties in inserting images. I have tried various ways and cannot succeed. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles And Images
On the page that is your main page, insert the Struts HTML tag html:base/ - that should help out somewhat. Also, if that doesn't work, try using the Struts html:img tags with the page= attribute, providing a module-relative path to where your image is stored. That should work without a hitch. Good luck. Caroline Jen wrote: I use tiles and stylesheet to display my web pages. I also try to insert some images in those pages. The tiles work fine. I have header, footer, navbar, content, etc. displayed without problem. But, I am curious to know if anybody has had difficulties in inserting images. I have tried various ways and cannot succeed. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles And Images
Try searching the archives this is a common issue. The requests for images are based on where the template tiles is using is located - not the location of the jsp being inserted in the template. One approach is to use the base tag - I do the following to ensure all images and links are rooted at the same level in the application - the root. This is the simplest, but there are other suggestions as well. This line is in the base template - or any template. base href=http://%= request.getServerName()%:%= request.getServerPort()%%=request.getContextPath()%/ Images then are referenced from the root of the web app - this is from the footer jsp img src=web/images/footer/struts-power.gif width=95 height=37 border=0 alt=struts/ My directory structure is App -- web (web stuff) --WEB-INF Others like the WEB-INF capability to protect resources. Cal http://www.calandva.com/Last update 08/01/03 -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 14:42 To: [EMAIL PROTECTED] Subject: Tiles And Images I use tiles and stylesheet to display my web pages. I also try to insert some images in those pages. The tiles work fine. I have header, footer, navbar, content, etc. displayed without problem. But, I am curious to know if anybody has had difficulties in inserting images. I have tried various ways and cannot succeed. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles - Forward - Images/Color not shown
Hi, First of all, when you have a bad page not showing what you expect, check the page source on the client side. Does the page contains the image tags and so on ? Does the page is well formed ? Is there some syntax errors ? Save the page, reload it from the server until you have a correct page. Look for the differences ... If the page is correct, this is a problem with your browser. If not, there is a problem on the server side. Check if all your tiles are inserted as expected. Hope this help, Cedric Bank Kiratisin wrote: Hi all, I have a problem with tiles not shown up. My web application uses struts/tiles on Tomcat 4.1.18. Almost every click on the site submits a form to an Action, which forwards visitors to the next page that consists of multiple main and small tiles. Now the problem is 'sometimes' some tiles (in the same page) don't show up. But when I click refresh button (and of course the browser warns if I want to resubmit the form), the tiles do show up again. It happens often with the images and background color, while the content text shows up normally. Can anyone help me? Ps. I don't know if this is related, but it trends to happen more often when I tested from outside the company network (the application is hosted at the company and it happens less when I tested at the office.) Any help would be greatly appreciated. -- Bank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]