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