i have writted tag file display error messaage attributes errormessage , errortype passed attributes. same not getting displayed in jsp. version used in xml 2.4.
<%@ tag language="java" body-content="empty" pageencoding="iso-8859-1"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ attribute name="errortype" type="java.lang.string" required="true" %> <%@ attribute name="errormessage" type="java.lang.string" required="true" %> <c:choose> <c:when test="${errortype == 'error' && not empty errormessage} "> <div id="errorcontainer" style="width: 99%; display: block;" align="left"> <table border="0" cellspacing="2" cellpadding="2"> <tbody><tr><td valign="top"> <img width="24" height="24" alt="error" src="../gif/iconerror.gif"/> </td> <td valign="middle"> <c:out value="${errormessage }"> </c:out> </td></tr></tbody></table> </div> </c:when> <c:when test="${errortype == 'warning' && not empty errormessage} "> <div id="warningcontainer" style="width: 99%; display: block;" align="left"> <table border="0" cellspacing="2" cellpadding="2"> <tbody><tr><td valign="top"> <img width="24" height="24" alt="error" src="../gif/iconwarning.gif"/> </td> <td valign="middle"> <c:out value="${errormessage }"> </c:out> </td></tr></tbody></table> </div> </c:when> </c:choose>
i have used below include in jsps
<%@ taglib prefix="custom" uri="/web-inf/tags"%> <custom:error errormessage="<%=partsformbean.geterrormessage()%>" errortype="error" />
i have placed error.tag under web-inf/tags.
kindly provide me solution.
thanks.
Comments
Post a Comment