• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

to pass variable to servlet from html

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a table with a checkbox in each row..and a submit button at the end.
On click of the submit button the named or id's of the checkboxes clicked should reach the servlet called from action tag of the html or jsp form
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK.

Is there a question?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're going to program for the web, you'll need to get a basic understanding of HTTP and how HTTP Forms work. This is the same whether you're using Servlets, JSP, PHP, ASP, Perl, DOT_NET, etc...

This chapter
http://csajsp-chapters.corewebprogramming.com/CSAJSP-Chapter16.pdf covers them.

If you're going to write servlets, I highly recommend reading the whole book - as well as the 2nd edition "More Servlets and Java Server Pages".
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
send parameter from html to jsp or servlet

first go there try to do that excercise
hope this helps
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is a trivial question. You can use the following methods to retrieve info from your HTML file.

<request object>.getParameter(<Parameter name> ;
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Anamika,

I guess u r trying to develop shopping cart sort of application.
Anyways the problem is quite simple..
Just use the getParameter() method of the HttpServletRequest object and access the parameter names..
Then store the corresponding rows into the database.
If u could send the source code of the program...I will try to solve your problem..

bye
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic