Opened 10 years ago

Closed 8 years ago

#671 closed enhancement (wontfix)

the server: jersey-way to handle convertion POST to smth else

Reported by: olhsha@mpi.nl Owned by: Twan Goosen
Priority: minor Milestone: ComponentRegistry-1.16
Component: ComponentRegistry Version:
Keywords: Cc:

Description

Andre has suggested an approach to handle the situation in DASISH-back-end, when a flex-based front-end is not capable to send PUT and DELETE requests. One uses jersey’s filter:

https://jersey.java.net/apidocs/1.12/jersey/com/sun/jersey/api/container/filter/PostReplaceFilter.html

All you need to do is just to add 2 rows in web.xml on the backend side, and to set up the header X-HTTP-Method-Override when you send a POST request which is to be translated to PUT or DELETE.

This works well for DASISH. Why does not one use the same approach for compreg? At moment the flex problem for compreg is solved by 4 auxiliary rest “manipulate” methods, e.g.

@Override

@POST
@Path("/components/{componentId}")
public Response manipulateRegisteredComponent(

@PathParam?("componentId") String componentId,
@FormParam?("method") String method) {

if ("delete".equalsIgnoreCase(method)) {

return this.deleteRegisteredComponent(componentId);

} else {

return Response.ok("Nothing to do, not 'delete' method").build();

}

}

Change History (4)

comment:1 Changed 10 years ago by DefaultCC Plugin

Cc: olhsha@mpi.nl added

comment:2 Changed 10 years ago by Twan Goosen

Milestone: ComponentRegistry-1.16

comment:3 Changed 9 years ago by Twan Goosen

Cc: olhsha@mpi.nl removed

comment:4 Changed 8 years ago by Twan Goosen

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.