JSP Get URL
JSP Get URL is used to get the url of the current JSP page. The HttpServletRequest interface has a method getRequestURL ( ) that return the url of the current page.
Understand with Example
The Tutorial illustrate an example from 'JSP Get URL'. To understand the example we create a getUrl.jsp that include a scriptlet. Inside the Scriptlet we have used the method getRequestURL that gives you the URL of the current JSP page.
<%=request.getRequestURL()%> : The method is used to obtain the URL of the current JSP page.
Here is the code of getUrl.jsp
Output will be displayed as: