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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:19:57+00:00 2026-05-21T17:19:57+00:00

I want to call servlet when radio button is clicked, how can I make

  • 0

I want to call servlet when radio button is clicked, how can I make it?

EDIT

I tried to add URL to servlet in javascript function like this

$.post( "ParentManagementServlet", "isActivated"); 

and like this

 $.post(<%=getServletContext().getContextPath()+"/ParentManagementServlet"%>, "isActivated"); 

and like this

  $.post("/ParentManagementServlet?isActivated=true");

but both does not call servlet!

here’s the url mapping of the servlet in web.xml

<servlet>
    <servlet-name>ParentManagementServlet</servlet-name>
    <servlet-class>ps.iugaza.onlineinfosys.servlets.ParentManagementServlet</servlet-class>
</servlet>
 <servlet-mapping>
    <servlet-name>ParentManagementServlet</servlet-name>
    <url-pattern>/ParentManagementServlet</url-pattern>
</servlet-mapping>

I usually add the servlet through its name, but I read that it’s better to get the servlet absolute path form servlet context.

  • 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-21T17:19:57+00:00Added an answer on May 21, 2026 at 5:19 pm

    As per the comments:

    about fireBug, here’s what returns $ is not defined

    The $ is definied by jQuery. You’ve apparently not declared it in your page. jQuery is a JS library and not something already builtin the browser or something.

    Put the following line before any other <script> in your <head>

    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    

    (you can of course also download and serve a copy from your own domain)

    <script src="jquery-1.5.2.min.js"></script>
    

    See also:

    • Update current page with Servlet – contains several complete jQuery-Servlet examples
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to call a Servlet from img src. I have defined a Servlet
I have an arraylist of objects in my servlet where I want to call
I want to call a html page on click of a button in mvc.
I want to call a method say success(message) of javascript from android activity. I
I want to call a Servlet which exists in a different war from my
I want to call ejb from servlet via remote interface. Maybe it is a
How to use JQuery to call a servlet which I usually call like this
I'd like to make an ajax call as a POST, it's going to go
I want to call a Servlet from a Java application. The problem is, that
I want to write a simple servlet in JBoss which will call a method

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.