JSP: Beans from factories?
From: Kai Grossjohann (kai_at_emptydomain.de)
Date: Wed, 17 Dec 2003 14:31:50 +0000
I have an object which has a factory method which returns objects that
I would like to use as beans in JSPs.
<jsp:useBean id="foo" class="blarfl"/> will call the constructor of
the blarfl class, though, so that's not what I want.
I can use a scriptlet along the lines of
<% Factory fact = new Factory();
Blarfl b = fact.findBlarfl(); %>
But then I don't know how to make b into a bean such that I can use
<jsp:setProperty/> and friends on it.
Maybe it works to use <c:set/>? How to do that?