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

  • Home
  • SEARCH
  • 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 8906215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:35:45+00:00 2026-06-15T02:35:45+00:00

I am using struts2 for my web application development. In a registration form there

  • 0

I am using struts2 for my web application development. In a registration form there I want to use query ajax, so that the form gets submitted asynchronously and on a successful form submission I can get a server side success message in form of a toast or a element that comes and disappears.

Well for that I have tried a lot and somewhere achieved this thing but not using jquery ajax but normal javascript and ajax rather.

The flow of the code is as follows:

  • Home.jsp page with the form contained.

            <s:form theme="simple" action="registrationForDemo"> <table>
                <tbody>
                    <tr>
                        <td><s:label value="username" /></td>
                        <td><s:textfield name="uName"
                                cssClass="textfield" /></td>
                    </tr>
                    <tr>
                        <td><s:label value="password" /></td>
                        <td><s:password name="password"
                                cssClass="textfield" /></td>
                    </tr>
                    <tr>
                        <td><s:label value="email" /></td>
                        <td><s:textfield name="email"
                                cssClass="textfield" /></td>
                    </tr>
                    <tr>
                        <td><s:label value="contact no." /></td>
                        <td><s:textfield name="contactNo"
                                cssClass="textfield" /></td>
                    </tr>
                    <tr>
                        <td><s:label value="location" /></td>
                        <td><s:textfield name="location"
                                cssClass="textfield" /></td>
                    </tr>
                    <tr>
                        <td><s:label value="category" /></td>
                        <td><s:select list="{'Hospital','Doctor','Clinic','Others'}" name="category"/></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><s:submit
                                value="Submit" cssClass="button" /></td>
                    </tr>
                </tbody>
            </table>
        </s:form>
    
  • The file where the mapping are defined i.e. struts.xml.

struts.xml file

  • When data is saved successfully in the database the output page is again the same page.

Now Using ajax and jquery I want to know how to achieve the required functionality. Where to pass the action from … and how to go further… ??

  • 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-15T02:35:46+00:00Added an answer on June 15, 2026 at 2:35 am

    well for me the solution was jquery.html() function. Where I passed the other html content to get the work done. Jquery html

    Jquery is awesome and light weight too.

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

Sidebar

Related Questions

I am using struts2 to build a web application and I use struts2 tags
The registered accounts in my web application (Created using struts2) gets a separate site
I use tomcat. I am developing a web application using struts2, and I use
I want to check deploying procedure of my struts2 web application developed using eclipse
I am using Struts2 for a web application development. i have this particular problem
i am working on a struts2 web application-project and using netbeans 6.9. i want
I want to develop a web-application with a fileupload mechanism using struts2 with fileUpload
I have one legacy web application based on struts2 (primarily using annotation). While debugging
In a web application using struts2 ejb hibernate, is it possible to tell the
I am using struts2 for developing a web application. I have include the required

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.