?
Solved

Get Value

Posted on 2005-03-21
4
Medium Priority
?
207 Views
Last Modified: 2010-04-01
Hi everbaody
my question is very basic but it important for me project
I want to take  post parameter value
but these value names same
example
......sky.jsp?btp=12&btp=143&btp=244&btp=123
i want to print this type for select query
"128,143,244,123"

and I don't know number of btp each time
thank you ..
0
Comment
Question by:skychan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 28

Expert Comment

by:rrz
ID: 13597641
You could use something like  
String[]  btpArray = request.getParameterValues("btp");
StringBuffer sb = new StringBuffer(btpArray[0]);
for(int i = 1 ; i > btpArray.length ; i++){
                                                          sb.append(",");
                                                          sb.append(btp[i]);
}
0
 
LVL 28

Expert Comment

by:rrz
ID: 13597645
String[]  btpArray = request.getParameterValues("btp");
StringBuffer sb = new StringBuffer(btpArray[0]);
for(int i = 1 ; i > btpArray.length ; i++){
                                                          sb.append(",");
                                                          sb.append(btpArray[i]);
}
0
 
LVL 28

Accepted Solution

by:
rrz earned 200 total points
ID: 13597648
String[]  btpArray = request.getParameterValues("btp");
StringBuffer sb = new StringBuffer(btpArray[0]);
for(int i = 1 ; i < btpArray.length ; i++){
                                                          sb.append(",");
                                                          sb.append(btpArray[i]);
}
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13601004
Using JSTL, it can be done like this,

<c:forEach  var='parameter' items='${paramValues}'>
    <c:forEach var='value' items='${parameter.value}' >
        <c:out value='${value}'/>,
    </c:forEach>
</c:forEach>

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
"Any files you do not have backed up in at least two [other] places are files you do not care about."
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question