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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:45:30+00:00 2026-05-30T07:45:30+00:00

I have a form in a jsp file, which I have used to get

  • 0

I have a form in a jsp file, which I have used to get the user details. On clicking the submit button, the form action has been set to another jsp file where the details are inserted into the database.
But before that as soon as the user enters the userid, there is a check availability button.
On clicking the the button I want the control to go to another jsp page along with the username as a parameter. There I am doing the check availability. I want to return the response to the previous jsp file.
Can this be accomplished using the ‘request dispatcher’. If yes can someone pls explain the include and forward methods of the request dispatcher. I have tried searching for it on the net. There is only code available. I want to know what this request dispatcher is and how it works.

  • 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-30T07:45:32+00:00Added an answer on May 30, 2026 at 7:45 am

    The request dispatcher dispatches the request to the given target. The request dispatcher basically passes the control to the given target. In case of JSPs, the JSP will then work with the given request and send its output to the given response.

    The include() method allows you to continue using the response after the control comes back, so that you can if necessary add some data. The included target is not allowed to manipulate the response headers. The target of an include() should be a partial of the final response. The forward() method allows you to pass the control fully to the given target. The forwarded target is allowed to manipulate the response headers. The target of a forward() should be the entire JSP file itself which you want to present in its full glory (which in turn can however include other JSPs).

    In this case, you need to send a forward. Oh, this kind of job doesn’t belong in a JSP, but in a Servlet. You may otherwise face IllegalStateExceptions when the JSP wherein you’re trying to forward the request has already sent some data to the response.

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

Sidebar

Related Questions

I have a index.jsp file that has two different types of forms <form action=searchpath
I have a one main jsp (file upload jsp screen) which has form elements.
I have the following in jsp: <form action=/ucReady2/uploadservlet method=post enctype=multipart/form-data> <label for=filename_1>File: </label> <input
I have a jsp form validate.jsp which contains 2 text fields where user enters
I have a jsp with a submit based on the html:form action. <html:form action=/nextPath>
I have a JSP form which is made of <input type=file/> tag alone for
I have a jsp file in which I have a form. It shows data
I have created one jsp form which contains the username textfield. On the click
I have the following code: index.jsp: <form name=f action=db/ajoutConducteur.jsp method=post> <input type=text pattern=\d{8} required
I have following piece of code in my jsp file which getSession information: <jsp:useBean

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.