The model is placed in the request attribute collection (unless you override it in the
<view> node with a scope="{application,session,request}" attribute).
Usually you want to use a tag library like JSTL to build your pages, it's a lot
cleaner than embedding scriptlets in your HTML. With JSTL, you could do something
like this:
<c:out value="${model[1]}"/>
But if you wanted to do it with scriptlets, you would do it like this:
<%= ((Collection)request.getAttribute("model")).get(1) %>
Jeff Schnitzer
[EMAIL PROTECTED]
Back from Burning Man, and all limbs still attached!
> -----Original Message-----
> From: Feutrier Olivier [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 30, 2002 1:29 AM
> To: [EMAIL PROTECTED]
> Subject: [Mav-user] [mav] How to use the model in a JSP ?
>
> Hi,
>
> I have a controller and a JSP model :
> "<command name="default">
> <controller class="common.j2ee.ui.ctl.test.Default"/>
> <view path="/jsp/common/myModel.jsp" type="document">
> <transform type="document" path="/jsp/common/default.jsp"/>
> </view>
> </command>"
>
> How and where to use the data stored in the model thanks to
> setModel(Collection) method ?
> In the JSP model like this :
> <% model.get(1); %> get(1) = I'm using a Collection...
>
> It does not work...
>
> Thank you for helping me...
>
> Best regards
>
> Oliver
>
>
> **********************************************************************
> Ce message et ses �ventuels fichiers attach�s sont confidentiels
> et sont uniquement � l'attention de la personne physique ou morale
> destinatrice. Si vous avez re�u ce message par erreur, merci d'en
> avertir l'exp�diteur.
>
> Ce bas de page assure �galement que ce message a �t� v�rifi� par un anti-
> virus
> **********************************************************************
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone? Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=urceforge1&refcode1=3390
> _______________________________________________
> Mav-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/mav-user
> Archives are available at http://www.mail-archive.com/
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Mav-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mav-user
Archives are available at http://www.mail-archive.com/