Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9227995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:13:01+00:00 2026-06-18T05:13:01+00:00

I want the URL for my API to have following format for users resource:

  • 0

I want the URL for my API to have following format for users resource:

http://hostname/webappname/something/something/serviceName/orgs/{id}/users

However, I get a 404 error as the URL mapping fails. But if I have following format, I get the response.

http://hostname/webappname/{id}/something/something/serviceName/orgs/{id}/users

This is my @Path annotation:

@Path("/orgs/{oid: [0-9]+}/users")

But if I have the following @Path annotation:

@Path("/orgs")

With URL’s

http://hostname/webappname/{id}/something/something/serviceName/orgs
http://hostname/webappname/something/something/serviceName/orgs

I always get a response back. Can someone tell how should I provide @Path annotation for my resource. Or where am I going wrong?

Users Resource class looks like this:

    @Path("/orgs/{oid: [0-9]+}/users")
    @Component
    public class UserResource extends Resource {

    }

Orgs Resource class looks like this:

    @Path("/orgs")
    @Component
    public class OrgResource extends Resource {

    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:13:07+00:00Added an answer on June 18, 2026 at 5:13 am

    I figured out the problem. It had nothing to do with the my @Path annotation. While creating this project I added some old code dependencies. One of then was unsharding filter whose job was to strip of shard present in the URL before passing it to the next filter. It was removing the {oid} from the requested path and hence there was a URL mapping error. I faced this issue only when I changed the URL format for my project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

everyone. I have following example script: <script type=text/javascript> $(document).ready(function() { var url = http://api.twitter.com/1/statuses/user_timeline/codinghorror.json;
I have the code for the following url:http://localhost/summary/myfile.csv I want the url to look
I want to create URL re-write rules for following URL in htaccess. http://example.com/vedios/category/fun/ ->
.htacesss RewriteCond %{REQUEST_URI} ^/api/(.+)$ RewriteRule ^api/(.+)$ /index.php?api=%1 [QSA,L] example ajax url request: 'http://hostname.com/api/ext/list.php?query=de' I
I have a situation where I want to make a request to third-party API(url
I have the following javascript. <script src=http://maps.googleapis.com/maps/api/js?sensor=true></script> <script src=geo.js></script> <script> function onPositionUpdate(position) { var
I want the url http://welcome.com (for example) to render the content from the url
I want this url http://www.youtube.com/watch?v=dgNgODPIO0w&feature=rec-HM-fresh+div to be transformed to: http://www.youtube.com/v/dgNgODPIO0w with php.
I have the following code below: <!DOCTYPE html> <html lang=en> <head> <title>HTML</title> <script src=http://code.jquery.com/jquery-latest.min.js></script>
I am using web api with ASP.NET MVC 4. I have the following named

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.