I am trying to obtain a URL parameter in my JSP customtag.This is the code I am trying...ServletRequest request = pageContext.getRequest();String viewType = request.getParameter("viewType");However, this returns null. Any ideas?
First, there may be no such parameter named as"viewType". I mean check the name and spellings.Secondly, try following code. In the following code ihave typecast the request object into"HttpServletRequest".HttpServletRequest request =(HttpServletRequest)pageContext.getRequest();String viewType = request.getParameter("viewType");Try this 'coz i have done this many times by thismethod.