I want to encode a url and send it to another page.However, when I press the link, it gives me page not found..
<%
String url="newjsp.jsp ?name=vimal&id= 0812573&NIC=vim al basdeo&f=nasha sahdjsa hk";
url=URLEncoder. encode(url,"UTF-8");
out.println("<a href="+url+"><i mg src='ajith-billa2.jpg' alt='Ajit'></a>");
%>
My URL becomes http://localhost:8080/WebApplication1/newjsp.jsp%3Fna me%3Dvimal%26id %3D0812573%26NI C%3Dvimal+basde o%26f%3Dnasha+s ahdjsa+hk after being encoded
How do I sort this prob out?
<%
String url="newjsp.jsp ?name=vimal&id= 0812573&NIC=vim al basdeo&f=nasha sahdjsa hk";
url=URLEncoder. encode(url,"UTF-8");
out.println("<a href="+url+"><i mg src='ajith-billa2.jpg' alt='Ajit'></a>");
%>
My URL becomes http://localhost:8080/WebApplication1/newjsp.jsp%3Fna me%3Dvimal%26id %3D0812573%26NI C%3Dvimal+basde o%26f%3Dnasha+s ahdjsa+hk after being encoded
How do I sort this prob out?
Comment