Hello, I have been searching through the forums and I have part of the answer, anyway here is what I am doing.
I have a
JSP with scripting that I want to eliminate. The scripting uses request.getContextPath and System.currentTimeMillis(). I decided that a tag handler would be the answer. I am trying to get the request object inside a simple tag. I searched the forums and I find that the object returned by getJspContext is really an instance of PageContext (Thanks Bear Bibeault).
So I assume I need this :
private PageContext context;
context = (PageContext) getJspContext();
Okay this should give me the pageContext object. Now I thought I could just do this :
private HttpServletRequest request;
request = context.getRequest();
request.getContextPath();
But I find that pageContext.getRequest returns a ServletRequest and getContextPath() is in HttpServletRequest. So I think I need a HttpServletRequest type ?
Am I missing something ? I feel like this is something obvious but I am having trouble getting there. Thanks in advance for any help !! I am somewhat new to tag handlers.