To use the text defined in a resource bundle on your JSP pages:
edit.jsp.myResources as the ID, and hr.MyResources as the Class. Set the Scope to session, and click OK.
Note:
If you do not compile the MyResources.java file till this point, then you will get an error symbol on the bean because the MyResources.class is not created till now. Open the MyResources.java file and compile it.
In the Insert Scriptlet dialog, enter the script for retrieving text from the resource bundle:
out.println(myResources.getString("CompanyName") + ": " +
myResources.getString("SiteName"));
AnyCo Corporation: HR Application.
<jsp:useBean id="myResources" class="hr.MyResources" scope="session"/>
<h2 align="center">
<% out.println(myResources.getString("CompanyName") + ": " +
myResources.getString("SiteName"));%>
</h2>
<% out.println(myResources.getString("UpdateButton"));%>
<input type="submit"
value=<% out.println(myResources.getString("UpdateButton"));%> />
If you now run your application, you will see the text you defined in your resource bundle displayed on the page.