Hi Elizabeth! You got my point. But encripting images goes far from my simple request. All I'm looking for is ability to store image path and its alt in a property file. Such files on my assumption should be localized (exactely as message resources). Did I understand right that at the time being there is nothing in Struts like this?
-----Original Message----- From: Elizabeth Barham [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 11:13 To: Roman Rytov Subject: Re: i18n and images? [ Not on the struts-user mailing list because this message does not directly relate to struts ] "Roman Rytov" <[EMAIL PROTECTED]> writes: > Is there any way to store image related info into a property file > and hardcode not an image location but its alias from this file? I > think smth. should exist for this purpose. Hi Roman, If I understand you correctly, yes, I agree that it is a good idea. As for a way to do it, I suppose it could be done any number of ways. My first attempt at it was by storing images in a database with the MD5 of the image itself being it's primary key, along with data about the image itself. From within a jsp page, for example, something like: <spec:img key="359aa1fbe4154ef7492760c63a09e79e662efd7d"/> could be called, which fetches the meta-information from the database and replaces the spec:img tag with something like: <img src="http://photoserver.your.com/359aa1fbe4154ef7492760c63a09e79e662efd7d.jpeg" alt="Picture of a pretty tree" height="210" width="50" /> In this case, the photo is fetched off of a file system which is the direction I'm currently going with it but originally it was designed as a cgi-bin program that pumps the image data to the browser. The "alt" is fetched from the database, along with the height and width. The suffix to the filename is determined from mime-type stored in the database. It would be possible to do things like: <spec:img key="359aa1fbe4154ef7492760c63a09e79e662efd7d" scale="5:1" /> This doesn't directly involve struts, though. However, I'm planning on implimenting a photo catalog system using struts, which allows users to upload photos. Then an SHA-256 message digest is made of the data, and meta-information is associated with the image itself (such as photographer, classification, and description) is gathered from the user. Some have stated that using the SHA-256 message digest algorithm in this fashion is disasterous but I disagree. It seems like a wonderful way to insure photograph uniqueness. Is this the type of thing you have in mind? I like your idea of the property file especially in regards to locales - that would be super if the Alt tag could produce messages in different languages. Elizabeth -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

