> From: Gerald de Jong [mailto:[EMAIL PROTECTED]]
> 
> i just employed the old Populator in ThrowawayBean and solved that
> problem.

Yup, ServletRequest.getParameterMap() is a Servlet 2.3 thing.

As you noticed, all the bean population code has been pushed out of the
core of the framework and into Controller base classes so that different
approaches can be taken.  You'll notice that
org.infohazard.maverick.ctl.ThrowawayBean extends Throwaway and adds the
bean population code.  You can safely extend Throwaway yourself and
populate using the old populator and thus not have to worry about
modifying future versions of Maverick.

> now i've just got that the jasper version used in Tomcat 3 looks too
early
> to
> understand taglibs.  how do i access the model without using taglibs?
> 
> hey, this seems to work!:
> <jsp:useBean id="model" scope="request" class="whatever..."/>
> 
> is that it?  (never seen an example, had to guess)

Yep, that will do it.  Then you can use <jsp:getProperty name="model"
property="blah"/> or even just <%= model.getBlah() %>

You can also get the model out of the request attributes in a scriptlet,
depending on your needs:

<% Whatever model = (Whatever)request.getAttribute("model"); %>

JSP can get really messy if you do this a lot.

BTW, I'm sure Tomcat 3 will understand taglibs of some sort, but
probably not JSTL (which is barely usable in its current early access
release, anyways).  It's just a question of finding taglibs you like.  I
find it almost impossible to write web applications without some sort of
expression language like the JSTL provides (or has been available in
XSLT or Velocity from the beginning).

Jeff Schnitzer
[EMAIL PROTECTED]

> On Friday 25 January 2002 15:41, Gerald de Jong wrote:
> > i built a trivial tryout webapp based on what i'm reading in the
> > friendbook-jsp example.  lots of undocmented stuff going on in
there,
> but
> > mav2 looks tight.  when the docs are out, smiles will be inevitable.
> >
> > problem is, as in the friendbook-jsp example, when i derive my
> controller
> > from ThrowawayBean, it's populating the bean with this command:
> >
> > Beanutils.populate(this,this.getRequest().getParameterMap());
> >
> > as it turns out, getParameterMap() causes a
> java.lang.AbstractMethodError
> > (whew, ain't never met one of them before!).
> >
> > my guess is that this is also a Servlet 2.3 thing.  care to dismiss
or
> > corroborate?
> >
> > grim evidence is piling up that Maverick is not at all a happy
camper in
> the
> > Tomcat 3 forest.
> >


_______________________________________________
Mav-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mav-user

Reply via email to