On 9/28/07, V. Jenks <[EMAIL PROTECTED]> wrote: > > I've got a question concerning how I might be able to display remote images > in an HTML email. > > In Wicket, I've built a small utility where our designers use a plain html > page to format our email newsletter. The html template page and images > reside outside of the webroot because my app is deployed as an ear file. > They have a maintenance page where they define a newsletter. This page > reads the html file and saves the contents into a field in the Newsletter > table. The newsletter contents which have been saved to the database is > what is sent to customers. > > The problem arises when these newsletters are sent to customers. Since the > images within the newsletter do not reside in the webroot, how would they be > displayed remotely? After editing, when they preview the newsletter locally > I use the ResourceReference method of displaying the images outside of the > webroot. Is there a way I can hard-code a remote URL to the images before I > persist it to the db? > > What it boils down to is; I'm not familiar w/ HTML emails and I'm trying to > figure out how I should proceed so remote images can be displayed once the > email is sent to a customer. > > The answer may be obvious but I'm out of ideas at this point.
Not sure if it is the answer you are looking for, but paths to shared resources (which packaged resources such as images are) are predictable. Basically: http://your.com/yourapp/resources/com.your.another.package.SomeClass/your_image_next_to_your_class.gif So there is /resources/ which is a reserved path for shared resources in Wicket. Then there is the name of the class you want to use to relatively reference your resource, and then there is the resource relative to that class. And that can be in a subdir, but you can't use '..' etc. Eelco --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
