Pankaj Gupta wrote:
Please tell me in Struts context. What do I need to write in my
html:text tag?
<input name="someName" value="<fmt:message
key="AppProperties.defaultText" />"
type="text">
Not sure how well that works... if you're using a JSP 2.4-compliant
container and the JSTL (which you would need to above to use fmt:), you
could use this:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
.....
<html:form action="/myAction">
<c:set var="value">
<c:choose>
<c:when test="${empty myForm.someName}">
<fmt:message key="AppProperties.defaultText" />
</c:when>
<c:otherwise>
${myForm.someName}
</c:otherwise>
</c:choose>
</c:set>
<html:text property="someName" value="${value}" />
.....
</html:form>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]