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 6775407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:54:12+00:00 2026-05-26T15:54:12+00:00

We are developing a restful api using jersey (1.9.1) and tomcat 5.5. A given

  • 0

We are developing a restful api using jersey (1.9.1) and tomcat 5.5.
A given resource is identified with a urn and we would like to address a specific instance of that resource. In order to achieve this, we used the following code:

@Path("/XXXs")
public interface XXXResource {
    @GET
    @Path("{id}")
    @Produces({ MediaType.APPLICATION_JSON })
    XXXInfo getXXX(@PathParam("id") String id);
}

The idea is to address this resource using the following url:

http://localhost:8080/restapi/XXXs/http%3A%2F%2Fns.something.com%2FXXX%2F2

The decoded path param value should be:
http://ns.something.com/XXX/2

However, when I make the request using the encoded url I get a bad request message from tomcat. So my questions are:

  • Is it correct to use a Urn as a path parameter?
  • Why is tomcat considering this request as a bad request?

Just in case, I changed the signature of the method so that the parameter is taken from the query string and it worked fine, but I want the parameter to be part of the path.

Thanks.

  • 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-05-26T15:54:13+00:00Added an answer on May 26, 2026 at 3:54 pm

    Ok, I solved it by adding the following line in catalina.properties:

    org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true

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

Sidebar

Related Questions

I'm developing a RESTful API for a client. The problem is, he's using a
I am developing my own PHP Library and I would like to call RESTful
I'm developing a simple RESTful API, and utterly in love with how minimalistic it
I'm using the RESTful authentication Rails plugin for an app I'm developing. I'm having
I'm developing a REST-ful web service using RESTEasy deployed on Tomcat. I've configured an
I'm developing a RESTful API and I wrote a mod_perl2 handler that takes care
i am developing a simple RESTful API on slim framework. I had no problem
I'm currently developing a library for the bitbucket issues RESTful API. I made good
I am developing RESTful API for my application. All getters (that use HTTP GET)
I'm developing a RESTful API service which initially will only be accepting and responding

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.