HTML confusing syntax, with jstl

Discussion in 'OT Technology' started by babygodzilla, Mar 14, 2007.

  1. babygodzilla

    babygodzilla I love rice

    Joined:
    Nov 5, 2001
    Messages:
    3,108
    Likes Received:
    0
    i have hidden inputs in a JSP that i need to pass thru to a servlet. the syntax is confusing me. the end result should be like
    Code:
    <input name="contact_type_001"...
    <input name="address_id_001"...
    <input name="note_id_001"...
    
    and so on. the code im trying to use is
    Code:
    <input name="contact_type_<c:out value="${row.contact_id}""/>
    
    ok yea that syntax is completely wrong and im rather confused on how to fix it, where to put the quotes.

    i feel like there should be a better way to pass an array-like thing from a JSP to a servlet, but i dont know how, other than using dynamic HTML names. it just looks so ugly.
    i googled this stuff but didnt come up with anything solid.

    thanks for any input
     
  2. Nocera

    Nocera ...

    Joined:
    Aug 9, 2000
    Messages:
    1,307
    Likes Received:
    0
    Location:
    Long Island, NY
    Try:

    Code:
    <input name="contact_type_<c:out value="${row.contact_id}"/>"/>
    
     

Share This Page