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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:54:32+00:00 2026-06-04T11:54:32+00:00

I have a text <s:select> in my jsp page . Now what i have

  • 0

I have a text <s:select> in my jsp page .

Now what i have to do is when someone selects a value from this dropdown ,
i need to call my action class to get some value based on dropdown selection.

Now this value (which i got from my actionclass) should be shown in the <s:textfield> below this dropdown .

Please 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-06-04T11:54:35+00:00Added an answer on June 4, 2026 at 11:54 am

    Well all you have to use the power of Ajax.You have multiple options to do this.

    1. User simple Javascript.
    2. User any javascript frameowrk like jquery,DOJO etc

    Bind you code with on-click/change even of the Select tag and send a simple request to the S2 action.you can either use Stream result to send data back from the S2 action or better (in my opinion) send back JSON data from your action class and user Jquery build in functionality to parse the JSON data at JSP

    user S2 JSON plugin to send and receive JSON data from Action and JSP to make life more easy.

    Please follow this tutorial to know how to use JQuery with JSON and struts2

    • using-struts-2-json-and-jquery

    Update

    You need to do something like this in your JSP code for Ajax and JQuery

    var selectedState = document.getElementById("selectboxid");
            var statedata = selectedState.options[selectedState.selectedIndex].value;
            var formInput='state='+statedata;
    $.getJSON('search/dropDownRenderer',formInput,function(data) {
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple search page with this text input form <form name=assetInput action=assetResult.jsp
I have two text-boxes which are used to select a From and a To
So I have a web page where you can select text boxes and close
I have used full text search mysql. My code is select * from uh_property
I have this string: Test: String And I want to select the text before
I have an AJAX call which loads an Dialog page, now depending upon the
In my jsp page i have one text box and two combo box. An
I have been facing some serious issues while executing this particular JSP page. CODE
I have two jsp files as follow: myform.jsp <%@ page contentType='text/html; charset=UTF-8' errorPage='' %>
I have an HTML select box in my JSP page that allows multiple selections.

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.