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

The Archive Base Latest Questions

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

I have created one jsp form which contains the username textfield. On the click

  • 0

I have created one jsp form which contains the username textfield. On the click of submit button it pass on to servlet and read parameter and display on the screen.

I want to generate a querystring of username with the url.

Can anyone tell me how can i do that??

  • 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-31T17:48:59+00:00Added an answer on May 31, 2026 at 5:48 pm

    The following example will add the username field in the querystring of the request URL.

    <form action="servletURL">
        <input type="text" name="username" />
        <input type="submit" />
    </form>
    

    Note that there’s no method. It defaults to GET already, which means that all form data is passed by URL.

    If you still don’t see the querystring in the request URL, then it means that your servlet is performing a redirect after submit.

    response.sendRedirect("result.jsp");
    

    The enduser will then see the redirected URL in browser address bar instead. If you don’t include the querystring in the redirect URL, then the enduser will indeed not see it at all.

    You should either be doing a forward() instead,

    request.getRequestDispatcher("/WEB-INF/result.jsp").forward(request, response);
    

    or append the query string yourself:

    response.sendRedirect("result.jsp?" + request.getQueryString());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Have Created Registration Jsp and Servlet.When I Insert the Values Using Form,Values not
i have created one jsp file but it doesn't running in any way..!! it
I have created an EE project in MyEclipse. I have one jsp file under
I have a JSP page and a servlet.The JSP has two input, one being
I have 3 .jsp's. The first one asks the user for their username. Once
I have created two JSP programs as follows. First One: Addmulti.jsp <html> <head><title>Upload Excel
i have one login.jsp web page where i have two textboxes for username and
I have created a dynamic web projects in eclipse which includes jsp pages and
I have created one service in my grails application. in that service 25 methods
I have created one UIImageView Here's code capView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:kARROW_CAP_NAME]]; capView.frame

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.