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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:17:25+00:00 2026-06-04T03:17:25+00:00

[using Apache Tomcat/7.0.27] It seems I only get this error ( HTTP Status 405

  • 0

[using Apache Tomcat/7.0.27]

It seems I only get this error

  • (HTTP Status 405 – Method Not Allowed)

when I try to make a REST request directly from the browser.

E.g by pasting this in the address bar :

http://localhost:8080/restExample/rest/catalog/video/14951/hello

When I run my test client Main.java everything works fine.

Any ideas as to why it wont let me execute a REST through the browser?

Client Side:

public class Main{
    public static void main(String [] args){
       ClientConfig config = new DefaultClientConfig();
       Client client = Client.create(config);   
       WebResource service = client.resource(getBaseURI(_package));
       runPutRequest(service,"video/128/This is the content with the new description");
    }
}

...
private static void runPutRequest(WebResource service,String path){
        String response = service.path("rest/catalog/"+path).accept(MediaType.APPLICATION_XML).put(String.class);
        System.out.println("Post Response :"+response);
    }

Server side:

@PUT
@Path("/video/{video-id}/{short-descr}")
@Consumes(MediaType.TEXT_PLAIN)
@Produces(MediaType.APPLICATION_XML)
public Video updateVideo(@PathParam("video-id") int contentid,
                         @PathParam("short-descr") String descr)
{       
    //Video video = searchByContentId(contentid);
    Video video = videoMap.get(contentid);
    video.setDescription(descr);

    videoMap.put(contentid,video);
    
    if( videoMap.get(contentid) != null){
        return videoMap.get(contentid);
    }else{
         throw new UnsupportedOperationException("NO object found");
    }
}
  • 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-04T03:17:27+00:00Added an answer on June 4, 2026 at 3:17 am

    The browser will issue a GET request for your resource – which you have declared as a @PUT on the server-side and are PUT-ing to it from your client-side code. The browser is trying to ‘fetch’ (or GET) the resource and nothing exists for @GET

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

Sidebar

Related Questions

I get this error on my application when i try to run in Tomcat,
I'm using Tomcat 6, and this is my logging.properties: handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler .level=FINE
It seems that Apache ivy downloads artifacts only from http://mvnrepository.com/ and few other places,
We have an application deployed on tomcat. To access application we are using apache
I am using Tomcat 6 and have some questions about Apache mod_jk as follows.
I am using Apache Commons Email library to send emails, but I am not
We have a large web app installation, using Apache/Tomcat/Jasper and jboss. In development environment,
I'm Creating a facebook application using apache-tomcat. I use the Java Facebook API. It
This error has been driving me nuts. We have a server running Apache and
I have an apache 2.2 server infront of a tomcat 6 server. using mod_proxy_ajp

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.