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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:06:59+00:00 2026-05-14T19:06:59+00:00

In my JSP I have a dropdownlist and a submit button when clicking the

  • 0

In my JSP I have a dropdownlist and a submit button when clicking the submit button I lose the value already selected in my list.
I am using the jstl because i need to construct other table corresponding the value selected in my list.For that I must call a submit button but the problem; it reset the value selected

I want to know if there is a way to save the value selected in my list even I click a submit button.
I work with JSP and eclipse environment.
Thank you for your help.

  • 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-05-14T19:07:00+00:00Added an answer on May 14, 2026 at 7:07 pm

    You need to preset the inputs with the request parameter values. You can access parameter values in EL by ${param.name}. In case of dropdowns rendered by HTML <select> element, you need to set the selected attribute of the HTML <option> element in question. You can make use of the ternary operator in EL to print the selected attribute whenever the option value matches the request parameter value.

    Basic example:

    <select name="foo">
       <c:forEach items="${options}" var="option">
           <option ${param.foo == option ? 'selected' : ''}>${option}</option>
       </c:forEach>
    </select>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JSP that is using Spring:form tags to bind controls to a
I have a self built JSP webapp and at the moment I'm using tomcats
I am using Spring Web MVC for my application. I have 1 dropdown list
I am changing a GET to a POST. Currently I have .jsp?id=a,b,c,d. When changing
I have a jsp page with two radio tags. The page contains a struts2
I have a JSP which attaches a XSL to an XML document pulled from
I'm running tomcat and have some jsp pages that display a subset of a
Right now I have a JSP page that allows to sort some items, when
I have this simple Jsp page: <%@ page language=java import=java.awt.Color%> <% Color background =
I have done Java and JSP programming in the past, but I am new

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.