How do you identify the original content path of a request?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How do you identify the original content path of a request?

Jason E Bailey-2
I'm dealing with resources requests that have suffixes.

When I'm at a component level, I'm trying to identify what the original
content path/ resource  is and there doesn't seem to be a way to do it.
Is anyone aware of a graceful way of doing this?

Thanks
- Jason


Reply | Threaded
Open this post in threaded view
|

Re: How do you identify the original content path of a request?

Bertrand Delacretaz
Hi,

On Mon, Sep 17, 2018 at 6:13 PM Jason E Bailey <[hidden email]> wrote:
> ...When I'm at a component level, I'm trying to identify what the original
> content path/ resource  is and there doesn't seem to be a way to do it...

Doesn't HttpServletRequest.getRequestPath help?

Maybe the info is lost during component inclusion? If so the simplest
way might be to save whatever information you need in request
attributes in a filter that's active at the top of the component
inclusion stack.

-Bertrand