aspose file tools*
The moose likes JSP and the fly likes problem with  select option to be used in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "problem with  select option to be used in JSP" Watch "problem with  select option to be used in JSP" New topic
Author

problem with select option to be used in JSP

Chintan Shah
Greenhorn

Joined: Jun 29, 2005
Posts: 27
Hey guys,
I am doing this thing. please forgive me..as i could not post new topic using <>..so i am just writing simple html code without <>..hope u guys understand
select name="time" multiple
option value="17" 5:00 PM option
option value="19" 7:00 PM option
option value="21" 9:00 PM option
option value="23" 11:00 PM option
select
When i try to retrieve "time" with multiple selection as 5:00 Pm,7:00 Pm ..on another page with request.getParameter("time")..it shows only the first selected value...
how do i get all values?
any help appreciated.
Chintan
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61628
    
  67

Before posting on a forum, it's a good idea to check the API documentation. Read what it says about getParameter().


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
vasuma patel
Greenhorn

Joined: Mar 07, 2006
Posts: 15
Try using getParameterValues("time")
Chintan Shah
Greenhorn

Joined: Jun 29, 2005
Posts: 27
I tried using getParameterValues...but problem is it is not showing proper values.
When i try to show time values on next page it shows
[Ljava.lang.String;@7aa187
i dont know what is this.
chintan
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61628
    
  67

Originally posted by Chintan Shah:
I tried using getParameterValues...but problem is it is not showing proper values.


Do you not think that would have been useful information to put into your first post?


When i try to show time values on next page it shows
[Ljava.lang.String;@7aa187
i dont know what is this.


That is what happens when you try to display an array. You'll need to iterate over the individual values if you'd like them to display individually.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with select option to be used in JSP