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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:13:56+00:00 2026-05-29T17:13:56+00:00

This could be a repeat question, I apologize. I have a jsp page in

  • 0

This could be a repeat question, I apologize. I have a jsp page in which I have some buttons. Each button has its own servlet to call. I want to know if there is any way I can call these servlets without using form because the user may choose any of the 3 functionalities given. I also need to pass a value from the jsp page to the servlets I call.

<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
<title>Configurations</title>  
<script type="text/javascript">  
    function runConfiguration(){  
        var config=${dataValues.get(0)};  
        //call servlet  
    }  
    function editConfiguration(){  
        var config=${dataValues.get(0)};  
        //call servlet  
    }  
    function deleteConfiguration(){  
        var config=${dataValues.get(0)};  
        //call servlet  
    }  
</script>  
</head>  
<body>  
<%  
String[] label={"Master Port","Baud Rate","Char Size","Stop Bits","Parity","RTU Port","Baud Rate","Char Size","Stop Bits", "Parity"};  
int i=0;  
%>  
<br>  
<br>  
<br>  
<table align="center" border="1">  
   <td><div align="center" style="background-color: goldenrod;"><b> ${dataValues.get(0)}</b></div>   
        <table width="210" align="left" border="1">  
            <td bgcolor="goldenrod"><b> Header1 </b></td>  
            <c:forEach var="data" begin="1" end="5" items="${dataValues}" varStatus="status">  
            <tr>  
                <td><%=label[i++]%>: ${data}</td>  
            </tr>  
            </c:forEach>  
        </table>      
        <table width="210" align="left" border="1">  
            <td bgcolor="goldenrod"><b> Header2 </b></td>  
            <c:forEach var="data" begin="6" end="10" items="${dataValues}" varStatus="status">  
            <tr>  
                <td><%=label[i++]%>: ${data}</td>  
            </tr>  
        </c:forEach>  
        </table>  
   </td>  
</table>  
        <c:choose>  
        <c:when test="${dataValues.get(11)==1}">  
                <p align="center"><b><i>This configuration is already running</i></b></p>  
                <p align="center">  
            <input type="button" value="stop" onclick="StopConfiguration"/>  
                </p>  
        </c:when>  
        <c:otherwise>  
                <p align="center"><b><i>This configuration is currently NOT running</i></b></p>  
                <p align="center">                     
                    <button type="button" onclick="runConfiguration()">Run</button>  
                    <button type="button" onclick="editConfiguration()">Edit</button>  
                    <button type="button" onclick="deleteConfiguration()">Delete</button>  
                </p>  
        </c:otherwise>  
    </c:choose>  
</body>  
</html>  
  • 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-29T17:13:58+00:00Added an answer on May 29, 2026 at 5:13 pm

    I see 2 options here:

    1. Changing a form’s URL accordingly to each button using JavaScript, right before sendiing a POST request;

    2. Use a form and the same servlet for all 3 cases. In the servlet you should determine what button has been pressed (their values are passed as a request parameter) and then go forward accordingly.

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

Sidebar

Related Questions

This could be weird, Have you ever come across a blog which you wanted
This could be considered a duplicate question, as a similar one has already been
I have a <div>&nbsp;</div> which has the following styles: background-position: 0 bottom; background-repeat: no-repeat;
First question. Hope this isn't a repeat. I have an unordered list of thumbnails
Could someone explain to me what this portion of code means? repeat scroll 0
This could quite possibly be the dumbest question ever asked. Our client wants us
I'm new to ASP.NET MVC so this could have an obvious answer. Right now
Sorry if I repeat my question but I have still had no clues of
This might be a very stupid question, but I have to ask it anyway.
I don't know if this exact question has been asked, if so I am

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.