Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Reading Multiple Values from List using JSP and Form Post Method

Reply
Thread Tools

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

 
 
Lew
Guest
Posts: n/a
 
      02-09-2008
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSP and Javascripts on same page (Passing values to JSP fromJavascript) Husain Javascript 3 04-14-2008 10:36 AM
[JSP] difference between jsp:forward and jsp:include alexjaquet@gmail.com Java 0 06-02-2006 01:21 PM
Multiple Form Post Using Javascript - Empty Post from FF Adam Javascript 8 11-24-2005 12:03 PM
Form problems, post method yeilds 0 at end of values David Mills Perl Misc 9 09-23-2003 01:08 PM
ASP, FORMS, POST METHOD And Post with out form(???) Don Glover the younger ASP General 0 07-13-2003 02:47 AM



Advertisments