Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jersey-dev] [External] : Obtaining Path template for Resource or Sub Resource at ContainerRequestFilter
  • From: Jan Supol <jan.supol@xxxxxxxxxx>
  • Date: Sun, 10 Mar 2024 19:19:34 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Cmx4gnpXk/1EzJIr2psiAvm+MJhwjSTCMam0DTUVyKk=; b=dgK3ZXb8RouO/XEu74nq0ZGrdintf369zvqdiHEPXNWDUl0rs1/lLpO4y4c1W7TsqsQZtT3PSVv9S8FSJi47FpDbOSKjFr9rjfZ3fVjOnZzYcAhETV/RFa/xP+scnq9xsjn7Bq0sQaoZjfCkid+Sk6xYJRPJivQ9593I0VZf6IZOrnCSgAEUBnR6m14NQydNiuEaxnY0kQcY/LX4oJVh2i31WIMLXJK5shOUNCDP/t58D4pw0kghJB7xYSGZlahHh+7twVfaitI6c2/9zPSJ8e5AAcw0Tna7uQNgSYFsDcGRzkIU3RsxTv7nTlXCst0sahv3BYzAFONXPuChtZn1Rw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nLJdRzZ4xOSbjquv6mW4SKKNCosqawiO07C847ttGOlGGKJwhS32u8oAfIXs7lBOnLhc/VbvnVwGN1qhhnswry3gZKnMrEbl6sMJ3hqrJWheNHjXEo54Rxw42eTLbEKXTdSFRoBbmSjSdHg5yfIhWV0AsRToI/NZWzUbtlKumVcQCY44g1Ts3jvWSFJ5pZCNY5Af6HcypLMzmbe3+PvJolXBGOxKisA0iThhyu+CvQPgOHhjYqtoVuQjdwnJgEYP1FazOhAQH6eqvNyAefhlAu1akBtetB2LbxETYZPGn5t8YdIiGZR8BkDvf63Bvm8k0zf7j2iBR45dZDPEG6tz4w==
  • Delivered-to: jersey-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/jersey-dev/>
  • List-help: <mailto:jersey-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/jersey-dev>, <mailto:jersey-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/jersey-dev>, <mailto:jersey-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHacGLulaOctuDU5keGwC1zUwdADLEsdNW2gARPSwCAAJor4A==
  • Thread-topic: [External] : [jersey-dev] Obtaining Path template for Resource or Sub Resource at ContainerRequestFilter

In ContainerRequestFilter, you can use (ExtendedUriInfo) ContainerRequestContext#getUriInfo. Or you can inject it using @Context​ ExtendedUriInfo info.


--Jan



From: Asaf Mesika <asaf.mesika@xxxxxxxxx>
Sent: Sunday, March 10, 2024 11:05 AM
To: Jan Supol <jan.supol@xxxxxxxxxx>
Cc: jersey developer discussions <jersey-dev@xxxxxxxxxxx>
Subject: Re: [External] : [jersey-dev] Obtaining Path template for Resource or Sub Resource at ContainerRequestFilter
 
Yes.

Mind I ask: How can the request filter obtain ExtendedUriInfo?


On Thu, Mar 7, 2024 at 6:18 PM Jan Supol <jan.supol@xxxxxxxxxx> wrote:
HI, 
Thanks,
Jan

From: jersey-dev <jersey-dev-bounces@xxxxxxxxxxx> on behalf of Asaf Mesika via jersey-dev <jersey-dev@xxxxxxxxxxx>
Sent: Thursday, March 7, 2024 8:41 AM
To: jersey developer discussions <jersey-dev@xxxxxxxxxxx>
Cc: Asaf Mesika <asaf.mesika@xxxxxxxxx>
Subject: [External] : [jersey-dev] Obtaining Path template for Resource or Sub Resource at ContainerRequestFilter
 
Hi,

I'm trying to find a way to to obtain the full path template as defined by the JAX-RS @Path annotations, at at Jersey filter - ContainerRequestFilter.
The only work-around I found so far was to iterate backwards from Resource to Parent Resource and obtain the path from it. The starting point is UriInfo --> ResourceMethod --> Resource ...

Thanks!

Asaf

Back to the top