Question
Adqura
IN
Last activity: 1 Jul 2024 11:33 EDT
Getting parameters from URL using JSP
I am running a URL in the browser and want to fetch the parameters passed into the link using JSP. I want to use those parameters to run an activity in the backend.
I tried the following code:
<%
String requestURL = request.getRequestURL();
String sectionName = request.getParameter("SectionName");
String id = request.getParameter("Id");
%>
The "requestURL" object gets the value "/Non_Interactive_Session_No_Context/NonInteractive" and the "sectionName" and "id" returns null. I require the URL which I am passing in the browser or the parameters which I am passing in the URL.
Can someone please help me with this?