Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8737827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:36:32+00:00 2026-06-13T10:36:32+00:00

how to display the selected options below in jsp <td width=75% valign=center> Start Date

  • 0

how to display the selected options below in jsp

<td width="75%" valign="center">
   Start Date : &nbsp;
   <input id="startDate" name="startDate" id = "startDate" type="text" size="20"><a href="javascript:NewCal('startDate','ddmmyyyy')"><img src="$
   Start Time :&nbsp;&nbsp;
   <select name="startTime" id = "startTime">
        <option value="0">10:00</option>
        <option value="1">11:00</option>
        <option value="2">12:00</option>
        <option value="3">13:00</option>
        <option value="4">14:00</option>
        <option value="5">15:00</option>
        <option value="6">16:00</option>
        <option value="7">17:00</option>
        <option value="8">18:00</option>
        <option value="9">19:00</option>
        <option value="10">20:00</option>
        <option value="11">21:00</option>
   </select>
</td>

i thought request.getParameterValues will be valuable but it shows only something like value="something" only but not the value between both of options tag.
Any ideas? thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:36:33+00:00Added an answer on June 13, 2026 at 10:36 am

    Best way is using EL (expression language). Request parameters are available as implicit objects in EL. ${param.startTime} equals request.getParameter("startTime").

    If you need the option’s text instead of the value it’s best to create an ArrayList of Strings which you can use to generate the dropdown and to look up the value:

    List<String> startTimeList = new ArrayList<String>();
    startTimeList.add("10:00");
    startTimeList.add("11:00");
    request.setAttribute("startTimeList", startTimeList);
    

    You can use JSTL (c:forEach) to generate the list using the index (see the varStatus attribute) as your option’s value:

    <c:forEach items="${startTimeList}" var="startTime" varStatus="status">
      <option value="${status.index}">${startTime}</option>
    </c:forEach>
    

    You can then use the value (index) to get an item from your list: ${startTimeList[param.startTime]}.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text box in JSP as below: <INPUT TYPE=text readonly=readonly NAME=IssueFlag ID=IssueFlag
First question, why is this style label, input { display:block; } reducing the width
How can I display only selected headers in DataGridView control? For example I have
How to get ItemsControl display items selected Item textbox text value using MVVM pattern?
I am trying to display only selected items in list view. public class Mact
I was using this routine, triggered by the Worksheet_Change event, to display a selected
Using VB 6 Once I run the project, How to display a previously selected
I'm trying to display the serial number of the 'recipient' you selected in a
I want to put facility to display distance between two places selected by user.
I am trying to display a default value (or even NO value) when selected

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.