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

 
 


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

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 Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.