File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes passing many values from jsp and getting only one value in servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "passing many values from jsp and getting only one value in servlet?" Watch "passing many values from jsp and getting only one value in servlet?" New topic
Author

passing many values from jsp and getting only one value in servlet?

maggie karve
Ranch Hand

Joined: Dec 29, 2009
Posts: 187
i am creating a dropdown box in jsp and sending it to servlet...

i am getting the particular value in servlet....
but when i am using it to update the database i dont know what to write??
my servlet is as follows

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

You may be interested in ServletRequest#getParameterValues.


[My Blog]
All roads lead to JavaRanch
maggie karve
Ranch Hand

Joined: Dec 29, 2009
Posts: 187
thanks i made changes in code..i used selectedColumn.equals("Principal") instead of ==operator and the code is updating the database values......
Fidel Edwards
Ranch Hand

Joined: Mar 19, 2008
Posts: 231
Hi Maggie,

Since you are using two <select > with the same name. Here you can do 2 things.

i) Either rename the first object name from "parameter" to some other.OR
ii) Use Enumeration request.getParameterNames("parameter") . In this you can iterate all the objects having name as 'parameter'.




God Gave Me Nothing I Wanted, He Gave Me Everything I Needed.
OCPJP6
maggie karve
Ranch Hand

Joined: Dec 29, 2009
Posts: 187
ok..i will do that ..thanks....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing many values from jsp and getting only one value in servlet?