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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:08:43+00:00 2026-06-02T11:08:43+00:00

I want to know that what is url encoding . I have 2 jsp

  • 0

I want to know that what is url encoding.
I have 2 jsp pages and one servlet.
When I run the application the url displayed is :

http://localhost:8080/myproject/index.jsp

where

index.jsp :

<form action="Myservlet" method="post">
    <input type="text" name="mytext" id="mytext"/>
    <input type="submit" value="submit"/>
</form>

after the submit button is clicked the URL displayed is :

http://localhost:8080/myproject/Myservlet

What is the meaning of URL encoding? How can I encode url?

From index.jsp goes to Myservlet then to result.jsp

Myservet#doPost // Do I need to do URL encoding here? If yes how ?

  fetching data from db.......
  ....................
  String nextJSP = "/result.jsp";
  RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(nextJSP);
  dispatcher.forward(request,response);

result.jsp

displays data here

  • 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-06-02T11:08:46+00:00Added an answer on June 2, 2026 at 11:08 am

    There are two types of encoding: HTML form encoding and URL re-writing.

    In form encoding, the URL string is converted into a valid ASCII format that’s Internet-ready. From the URLEncoder.encode(String, String) docs:

    Translates a string into application/x-www-form-urlencoded format
    using a specific encoding scheme. This method uses the supplied
    encoding scheme to obtain the bytes for unsafe characters.

    The second kind is URL rewriting. The URL string is encoded with a session id in case the client browser doesn’t support (or has disabled) cookies or session tracking. From the HttpServletResponse.encodeURL(String) docs:

    Encodes the specified URL by including the session ID in it, or, if
    encoding is not needed, returns the URL unchanged. The implementation
    of this method includes the logic to determine whether the session ID
    needs to be encoded in the URL. For example, if the browser supports
    cookies, or session tracking is turned off, URL encoding is
    unnecessary.

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

Sidebar

Related Questions

hi all i want to know that while specifying url in my iphone native
I have the following xml structure : <?xml version=1.0 encoding=utf-8 ?> <nws> <url>http://cpa.hypotheses.org/feed</url> <url>http://news.ycombinator.com/rss</url>
I want to know that how voice recognition in android works? Which library it
i want to know that when we want to use push notification service.From where
I want to know that does apple's Push Notification Server generate new device token
I want to know that how can I add help support to my winform
i want to know that why do we add an app.config file in c#
I want to know that what will happen to my activity incase of an
I want to know that Filename1, provided by the user is the same as
I want to know that can mouse click event detects colors or even strings.

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.