How is the  value for  a radio button caught?
Would anyone be abe to help me thru with the JSP and form bean in this
scenario?
Sangeetha Nagarjunan




                                                                                       
                             
                    "Nicolas De                                                        
                             
                    Loof"                 To:     "Struts Users Mailing List" 
<[EMAIL PROTECTED]>      
                    <nicolas.deloof       cc:                                          
                             
                    @cgey.com>            Subject:     Re: How to iterate over 
Arraylist                            
                                                                                       
                             
                    01/23/03 05:44                                                     
                             
                    PM                                                                 
                             
                    Please respond                                                     
                             
                    to "Struts                                                         
                             
                    Users Mailing                                                      
                             
                    List"                                                              
                             
                                                                                       
                             
                                                                                       
                             




You just have to add at begining of your JSP :

<%@ taglib uri="/WEB-INF/struts-loigc.tld" prefix="logic"%>

Without that, you can see that logic:xx tags appears in resulting HTML not
beeing interpreted by JSP parser.

Nico.

> My JSP:
>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
> <jsp:useBean id="person" scope="request"
> class="de.hauschel.wapen.bt.vo.VOPerson"/>
> <html>
> <head>
> <title>Struts Form for listpersonsForm</title>
> </head>
> <body>
>
> <table border="1" width="100%">
>   <tr>
>     <th align="center" width="30%"> �berschrigft </th>
>   </tr>
>   <logic:iterate id="person" name="persons" >
>   <tr>
>     <td align="left"> <bean:write name="person" property="username" />
>     </td>
>   </tr>
>   </logic:iterate>
> </table>
> </html>
>
> My Action:
> public class ListpersonsAction extends WapenAction
> {
> public ActionForward execute(
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> throws Exception
> {
> Category cat =
> Category.getInstance(
> "de.hauschel.wapen.struts.action.ListpersonsAction");
>
> cat.debug("->execute(mapping, form, request, response)");
>
> ListpersonsForm listpersonsForm = (ListpersonsForm) form;
>
> ArrayList persons = new ArrayList();
>
> BusinessDelegate bd = BusinessDelegate.getInstance();
> persons.add( bd.getPerson( "fritz" ) );
> persons.add( bd.getPerson( "fredy" ) );
>
> cat.debug( "persons.size(): " + persons.size() );
>
> request.setAttribute( "persons", persons );
>
> cat.debug("<-execute(mapping, form, request, response)");
>
> return mapping.findForward( SUCCESS );
> }
> }
>
> My Problem:
>
> No usernames listed !
>
>
> Output of Log4j:
> 23 Jan 03 12:46:04 DEBUG
> de.hauschel.wapen.struts.action.ListpersonsAction.execute
> (Line:57) - ->execute(mapping, form, request, response)
> 23 Jan 03 12:46:04 DEBUG
> de.hauschel.wapen.struts.action.ListpersonsAction.execute (Line:67) -
> persons.size(): 2
> 23 Jan 03 12:46:04 DEBUG
> de.hauschel.wapen.struts.action.ListpersonsAction.execute (Line:71) -
> <-execute(mapping, form, request, response)
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to