Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet How can I get the full URL with the attached parameters?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sudha
How can I get the full URL with the attached parameters?
1 Answer(s)      6 years ago
Posted in : JSP-Servlet



Advertisement
View Answers

March 27, 2009 at 1:12 AM


Hi Friend,

You can try the following code to solve your problem. Here we can use combination of getRequestURL() method and getQueryString() method to achieve requirement.


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>

<%
String str=request.getRequestURL()+"?"+request.getQueryString();
%>
</body>
</html>

Thanks
RoseIndia Team


Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com