struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Yumul" <...@polexis.com>
Subject <logic:present>
Date Thu, 15 Mar 2001 00:50:27 GMT
Is there a particular reason why the <logic:present> tag from the
struts-logic taglib can't check if a value has been set in the request w/
the Servlet.setAttribute() method?

It seems like this would be common design pattern:

	The Action class successfully processes some submitted form data,

	It adds some info to the request object
(HttpServletRequest.setAttribute()),
	(like a status message of the whatever the form was supposed to do)

	Passes control to whatever the mapping.findforward() method returns;

	Then the JSP displays the page with the status message w/ a
request.getAttribute().

Essentially, I'd like to avoid a:

<%
	String mesg = request.getAttribute("status.message");
	if (mesg != null) {
		out.println(mesg);
	}
%>

in my JSP page and leverage as much as I can from the taglibs.  Does struts
provide any other mechanism to accomplish this?


Thanks,
Rich


Richard M. Yumul
Polexis, Inc.
http://www.polexis.com
transforming data into knowledge


Mime
View raw message