• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PathParam with @POST

 
Deepa Sreedhara
Ranch Hand
Posts: 47
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Could someone let me know if POST works well with PathParam? On deployment I'm getting HTTP 405 error for "http://localhost:8080/RestTwo/two/Food/abc" where 'two' is url-pattern.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone let me know if POST works well with PathParam?

Yes, it does.

On deployment I'm getting HTTP 405 error for "http://localhost:8080/RestTwo/two/Food/abc" where 'two' is url-pattern.

How does your client code look like?
 
Deepa Sreedhara
Ranch Hand
Posts: 47
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont know how to write a client. Is it a way to resolve the error?
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you use an HTML/JSP page that submits the request?
 
Deepa Sreedhara
Ranch Hand
Posts: 47
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using RestClient Firefox add-on to test the webservice. Pathparam for GET request are ok, but for POST, its giving the Http 405 error.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
405 means "method not allowed'.

Can you post the setup of the @GET method that works well? Is that method in the same class?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic