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 7790599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:38:00+00:00 2026-06-01T21:38:00+00:00

I have an arraylist for Strings eqArray . I need to show it in

  • 0

I have an arraylist for Strings eqArray.

I need to show it in a drop-down list for which I’m using the following in my JSP:

<% 

    for(int count=0;count<eqArray.size();count++){ %>
            <option value="<%=eqArray.get(count)%>"><%=eqArray.get(count)%></option>  
     <%} 
%>

I have an eqName String which is part of eqArray and should be the selected value by default.

How do I go about it without having to check and set the first option as eqName always?

  • 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-01T21:38:02+00:00Added an answer on June 1, 2026 at 9:38 pm
    <% for(int count=0; count<eqArray.size(); count++){ %>
        <option value="<%= eqArray.get(count) %>" <%= (eqArray.get(count).equals("eqName"))?"selected":"" %> ><%= eqArray.get(count) %></option>  
    <%} %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

E.G. to create an ArrayList of Strings we have to do something like List<String>
I have an ArrayList called account which contains Strings. I'm trying to write a
I have a condition like this List<String> mainList = new ArrayList<String>(); for(int i=0; i<3;
I have an ArrayList that contains Strings and also contains other ArrayLists which may
If I have a simple list of Strings: List<String> stringList = new ArrayList<String>(); I
Hi I have the following arraylist strings of dates [2010-08-01,2010-08-02,2010-08-04,2010-08-05,2010-08-06,2010-08-07,2010-08-08,2010-08-09,2010-08-11,2010-08-12,2010-08-13,2010-08-14,2010-08-15,2010-08-17,2010-08-18,2010-08-20,2010-08-21,2010-08-26,2010-08-28,2010-08-29] I have 2 aims
I have a list of strings , I browse it and count number of
So I'm using a list of strings that I have inputted, so all the
I have ArrayList of Strings. I need to randomize it by hash number. Example:
I have a list containing 305899 Strings (which is the username for a website).

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.