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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:10:16+00:00 2026-05-19T09:10:16+00:00

I created a JSP page where I created a search form where the user

  • 0

I created a JSP page where I created a search form where the user can see some specific records of a student in the same page just below the search button. The search is done as follows:

"select col1, col2 from table1 where regn_no='"+regn_no+"'";

After displaying two columns(col1, col2), I have another button in the same jsp page to view the details to see details of the particular student based on the regn_no. The search button is working fine, but the view details button not. I do not know how to call the same servlet. Any help will be much appreciated.

  • 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-19T09:10:17+00:00Added an answer on May 19, 2026 at 9:10 am

    The button’s name=value pair get sent as HTTP request parameter as well. Assuming that you’ve

    <input type="submit" name="search" value="Search">
    

    and

    <input type="submit" name="view" value="View">
    

    then you can distinguish the button pressed in the servlet as follows:

    if (request.getParameter("search") != null) {
        // Search button pressed.
    } else if (request.getParameter("view") != null) {
        // View button pressed.
    }
    

    See also:

    • Hidden features of HTML

    Unrelated to the problem, you’ve got a SQL injection risk there. Use PreparedStatement.

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

Sidebar

Related Questions

In a JSP page, I created a <h:form enctype=multipart/form-data> with some elements: <t:inputText> ,
I have a jsp page that is trying to reference some user defined classes.
I have created Spring 3.0 application where after Login user get displayed jsp page
I created a WebApplication in NetBeans. It has a JSP page and a webservice.
I have created one jsp form which contains the username textfield. On the click
My JSP-application requires some configuration; so I created the Settings class which is a
I have created a jsp page which run fine when executed in tomcat.But when
I am creating a project in struts2 I have created a Registration.jsp page like
I have a jsp page in which rows are created dynamically to a table
I have created an index.jsp as the start page in an Eclipse project using

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.