Results 1 to 2 of 2

Thread: Forms in jsp

  1. #1
    bbq
    bbq is offline Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Rep Power
    0

    Default Forms in jsp

    I have a problem when I try to collect information from a form in a JSP file.
    I have a field in the form and its type is “select”. In the field there are states
    Then I collect from jsp file in a variable (type string)
    State= request.getParameter("state");)
    It Works for state with a only Word, for states such as “san francisco, san josé” doesn’t work

    why?

  2. #2
    Jack is offline Senior Member
    Join Date
    Jun 2007
    Posts
    130
    Rep Power
    0

    Default

    Look this
    Java Code:
    <&#37;
    for (int i=0; i<state.size(); i++) {
    %>
    <option value="<%=state.elementAt(i).toString()%>"><% =state.elementAt(i).toString()%></option>
    <%
    }
    %>

Similar Threads

  1. Use multiple forms
    By coco in forum Java Applets
    Replies: 2
    Last Post: 06-14-2010, 06:14 AM
  2. Login Forms
    By dankonsoer in forum New To Java
    Replies: 1
    Last Post: 08-07-2008, 01:06 PM
  3. Full Forms of Java Tech
    By Gajesh Tripathi in forum New To Java
    Replies: 1
    Last Post: 10-18-2007, 10:59 AM
  4. Creating Sub forms in java netbeans 5.0
    By java_newbie in forum NetBeans
    Replies: 14
    Last Post: 08-06-2007, 08:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •