This is my index.jspx page
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fmt="http://java.sun.com/jstl/fmt" >
<jsp:directive.page language="java"
contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
<jsp:text>
<![CDATA[ <?xml version="1.0" encoding="ISO-8859-1" ?> ]]>
</jsp:text>
<jsp:text>
<![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ]]>
</jsp:text>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title><fmt:message key="indexPageTitle"/></title>
</head>
<body>
<h3>Welcome </h3>
<c:set var="url" value="./usermngr.htm"></c:set>
<a href="${url}">Users</a>
</body>
</html>
</jsp:root>
This is my another registrationForm.jspx file(In this the keys' values are getting displayed getting ):
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:spring="/spring">
<jsp:directive.page language="java"
contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
<jsp:text>
<![CDATA[ <?xml version="1.0" encoding="ISO-8859-1" ?> ]]>
</jsp:text>
<jsp:text>
<![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ]]>
</jsp:text>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body>
<form action="post" name="userRegistrationForm">
<fieldset>
<legend><fmt:message key="piLegendLabel"/></legend>
<table cellpadding="5%" cellspacing="5%">
<tr>
<td><fmt:message key="firstNameLabel"/></td>
<td> <input type="text" name="emp_firstName" maxlength="100" size="15" /></td>
<td><fmt:message key="middleNameLabel"/></td>
<td> <input type="text" name="emp_middleName" maxlength="100" size="15" /></td>
<td><fmt:message key="lastNameLabel"/></td>
<td> <input type="text" name="emp_lastName" maxlength="100" size="15" /></td>
</tr>
<tr>
<td><fmt:message key="dobLabel"/></td>
<td> <input type="text" name="emp_dob" maxlength="11" size="11" readonly="true" /> </td>
</tr>
</table>
</fieldset>
</body>
</html>
</jsp:root>
MessageResourceBundle.properties contents:
Code:
indexPageTitle=EIS
registrationFormTitle=Registration Form
#Personal Information Labels
piLegendLabel=Personal Information
firstNameLabel=First Name :
middleNameLabel=Middle Name :
lastNameLabel=Last Name :
dobLabel=Date Of Birth :
Please let me know if anything wrong..
Thanks