question is whether this shouldn't be solved on different level.. I can
imagine these rules in .htaccess or similar container settings, but why
would we want to bother user app? It will degrade performance in both
ways - app will have to handle more requests than necessary and redirect
itself could be faster when handled in lower layer..
.. and about dynamic redirect.. do you have solid usecase for that? btw
you can do this easily by container filter(s) already, but you would
need to do in on http level.. (as stated previously..)
Pavel
On 8/5/11 5:56 PM, Jose Antonio Illescas Del Olmo wrote:
> Your opinion about this new feature?
>
>
> Add standard mechanism to Redirect after POST/PUT/DELETE
> --------------------------------------------------------
>
> Key: JAX_RS_SPEC-120
> URL:http://java.net/jira/browse/JAX_RS_SPEC-120
> Project: jax-rs-spec
> Issue Type: New Feature
> Reporter: joseaio
> Priority: Minor
>
>
> Allows @POST, @PUT and @DELETE with String param to allows redirection.
>
> example:
>
> @Path("/some")
> public class Some {
>
> @POST("/other-resource") => this allows redirection after POST (if
> no error/exception) => I think that redirection is usefull on
> HTML/XHTML mediaTypes only
> @Produces("text/html")
> public long create (...)
>
>
> see:http://en.wikipedia.org/wiki/Post/Redirect/Get
>
> Another interesting feature is add a dynamic URL generator on @POST,
> @PUT and @DELETE
>
> @POST(MyDynamicURLGenerator.class) => sometimes is necessary
> dynamic/programatic URL for redirections (using another value type for
> @POST, @PUT and @DELETE annotations)
>
>
>
>