users@jersey.java.net

Problem with PUT method.

From: Lakkaraju Krishna <lkrishna_at_UpToDate.com>
Date: Tue, 3 Aug 2010 12:37:31 -0400

Hi,

I am trying to write a @PUT method using Jersey and upon starting the server, the server is not recognizing the PUT operation.

The sample PUT method:

@Path("/event")
public class EventRestService{
@PUT
      @Path("{eventType}")
      @Consumes(MediaType.TEXT_PLAIN)
      public Response updateEventLog(@PathParam("{eventType}") String eventType){
            //List<Event> eventLst;
            System.out.println(eventType +" ========> from Server.");
            return null;
      }
}

URL: http:/localhost/rest/event/123

I am getting 405 exception, why? Am I doing anything wrong here !

- Lakkaraju

This e-mail message may contain confidential and/or privileged information. If you are
not an addressee or otherwise authorized to receive this message, you should not use,
copy, disclose or take any action based on this e-mail or any information contained in the
message. If you have received this material in error, please advise the sender immediately
by reply e-mail and delete this message.

Thank you.