• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

post to servlet

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

i ame trying to post a arraylist to a servlet...
i really havo no idea hoe to this in the form i made.
with the standard input field this is no problem.
i understand how to get to the servlet but not how to post a arraylist.
many thanks in advance.
Ramon
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since you say "form", I assume you're trying to do this from a browser with an HTML form?

ArrayList is a Java class, so it can't be used by HTML. Can you tell us in more detail what you're trying to do?
 
Ramon Haayema
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Within the jsp file i have a arraylist.
that array list need to get the servlet.
like
<FORM method="post" action="servlet/Servlets.loginservlet">
<H5>User id :<BR>
<INPUT size="10" name="user">
<BR>
Password :<BR>
<INPUT type="password" name="password" size="10"><BR>
<INPUT type="submit" name="Login" value="login">

like this accept,i need to post the arraylist.

i hope this explaind it.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, I'm more confused now. A JSP doesn't post to a servlet - it generates text to be sent to the browser. The browser -where there's no Java involved- then posts something to a server if the user submits a form.

Are you trying to make the elements of the ArrayList part of the HTML form? If so, how about making them hidden fields of the form?
[ July 19, 2008: Message edited by: Ulf Dittmer ]
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i believe you need to carry data from servlet to jsp. you need scope to carry it.. you can use request or session scope(accor to requirment) to store array list object in servlet and then retrieve it in jsp
 
reply
    Bookmark Topic Watch Topic
  • New Topic