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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:26:55+00:00 2026-05-31T04:26:55+00:00

I have below 1) StudentDAO.java -> has a method to list all students 2)

  • 0

I have below

1) StudentDAO.java -> has a method to list all students

2) ListStudentServlet.java -> Contorller to get the list and send to jsp

3) ListStudent.jsp -> Display Student List

Now I want to add condtions such as

studentId greater than, less than, equals, etc
StudentName like ‘%A%
StudentDOB between date1 and date2

what’s the best approach to get results based on above conditions. Do I need to creat separate methods for each of the condition or can i have one method with different where clauses?

Please can you an example?

thanks

  • 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-31T04:26:56+00:00Added an answer on May 31, 2026 at 4:26 am

    You can supply different GET parameters to the servlet. For example:

    • ?operator=greaterThan&column=studentId&value=5
    • ?operator=like&column=name&value=%A

    You can also have these things coded in the servlet itself, and only submit one parameter that identifies the combination. For example, if you have a list of queries, you can have ?queryId=5

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

Sidebar

Related Questions

I have below piece of code in one my JSP <%@ page language=java import
I have below a list of text, it is from a popular online game
I have below list of links <div id='list1'> <a href='#1'>USA</a> <a href='#2'>Canada</a> <a href='#3'>France</a>
I have below table in SQL server 2008.Please help to get expected output Thanks.
Would the second autoload method I have below be better performance? <?php // regular
I have below sequence of transaction with isolation level as serializable trnsaction1 transaction2 get
I have below html code in my aspx. <input type=hidden id=medicalLink value='<a href=/forms/contactus.aspx >Contact
I have below query I am trying to show message 'No SubSource for this
I have below trigger ALTER TRIGGER [dbo].[DeleteUserData] ON [dbo].[site_users] AFTER DELETE AS BEGIN SET
I have below code in html. <li class=selected runat=server id=lihome><a href=/ISS/home.aspx title=Home><span>Home</span></a></li> Now I

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.