[EMAIL PROTECTED] wrote:
> Do you use listResourceBundle? How do you take care of images? (i.e. gifs/jpgs).
I use PropertyResourceBundles instead. If I need a separate image per language, I
make the URL of the image one of the strings looked up, and use it to dynamically
create the <img> link.
>
> I have been trying to use listResourceBundle with JSP but I always get resource
> not found exception even though my classes are in the same path. I am using JWS
> 2.0.
>
I've had no problems with resource bundles in several environments, including JSPs
-- haven't tried under JWS though. The thing you have to remember is to reference
them with fully qualified names just like a Java class. For example, if you have a
package named com.mycompany.mypackage with a resource bundle file named
MyProperties.properties in it, you'd load that bundle like this:
ResourceBundle bundle =
ResourceBundle.getBundle("com.mycompany.mypackage.MyProperties");
(Same load command is used if MyProperties is actually a ListResourceBundle class
in this package.)
Craig McClanahan
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html