cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Kreipke" <>
Subject RE: XSP logicsheet for the ServletContext object
Date Fri, 16 Aug 2002 22:00:10 GMT
I just noticed that class XSPUtil (the implementing class for util taglib)
has the following function, which also shows how to get context info in

public static Object getContextAttribute(Map objectModel, String name)
	Context context = ObjectModelHelper.getContext(objectModel);
	return context.getAttribute(name);

In XSP (assuming XSPUtil class is already imported):

	// objectModel is already a local var available to your XSP
	String attr = XSPUtil.getContextAttribute(objectModel, "foo");

	// If you want this for anything else....
	Context context = ObjectModelHelper.getContext(objectModel);



Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message