Hi,
I have been trying to use a ResourceBundle in my Bean class. The
code is simple but I always get the following ServletException:
javax.servlet.ServletException: Cannot create bean of class intl.IntlText
The code I have for the bean is as follows:
// SOF
import java.util.ResourceBundle;
public class IntlText {
private ResourceBundle rb = null;
public IntlText() {
rb = ResourceBundle.getBundle("Configuration");
}
public String getTitle() {
return rb.getString("nokpi.title");
}
}
// EOF
The JSP:
<!-- SOF -->
<HTML>
<jsp:useBean id="it" scope="session" class="IntlText" />
<HEAD>
<TITLE>
<jsp:getProperty name="it" property="Title"/>
</TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>
<!-- EOF -->
I have the Configuration.properties file located in the root of the
WebServer. I have also tried putting it in the same dir as the class
but it still doesn't work.
Any ideas anyone ?
Thanks,
-John K
===========================================================================
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