Re: Reading Multiple Values from List using JSP and Form Post Method

Discussion in 'Java' started by Lew, Feb 9, 2008.

  1. Lew

    Lew Guest

    wrote:
    > Hi,
    >
    > I have a form that contains a list box from which the user can select
    > multiple values. I am sending the form content to a jsp page in order
    > to process the information.
    >
    > I am trying to convert the selected values on the list to an array
    > that can be processed using the jsp page.
    >
    > I am looking to do something like this
    >
    > <%
    >
    > String SelectedValues[] = request.getListofValues("LR11");
    >
    > %>
    >
    > So far I've been unsuccessful in finding any tutorial on the net that
    > explains how to do this.


    OTOH there are plenty of tutorials about how to do just that sort of thing
    using the "model-view-controller" (MVC) pattern. Check out Java Server Faces
    (JSF) and Struts for two excellent approaches.

    Don't POST to a JSP, POST to a servlet. Do not put Java code ("scriptlet") in
    your JSPs at all, ever. JSPs are for presentation, not logic.

    At the end of its logic phase, the servlet (the "controller") would grab some
    result object from the business logic (the "model") and forward it and all
    action to the next JSP (the "view").

    --
    Lew
     
    Lew, Feb 9, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    4,547
  2. Don Glover the younger

    ASP, FORMS, POST METHOD And Post with out form(???)

    Don Glover the younger, Jul 13, 2003, in forum: ASP General
    Replies:
    0
    Views:
    518
    Don Glover the younger
    Jul 13, 2003
  3. David Mills
    Replies:
    9
    Views:
    124
    David Mills
    Sep 23, 2003
  4. Adam
    Replies:
    8
    Views:
    477
  5. Husain
    Replies:
    3
    Views:
    202
    Thomas 'PointedEars' Lahn
    Apr 14, 2008
Loading...

Share This Page