rest icon indicating copy to clipboard operation
rest copied to clipboard

Support breaking the view layer from the control layer

Open glassfishrobot opened this issue 14 years ago • 6 comments

(Email from Guilherme Silveira, http://java.net/projects/jax-rs-spec/lists/jsr339-experts/archive/2011-03/message/90 )

4. Also support breaking the view layer from the control layer

If a method does not serialize or return anything, assume a default behavior so you don't have to repeat yourself all over the place. For example, if the show method did not return anything it would go to "/software/show.jsp" or /software/show.json.jsp or /software/show.xml.jsp etc according to conneg. To implement it, the semantic model needs to be exposed again:

public interface PathResolver { String pathFor(ResourceMethod method); }

Affected Versions

[2.0]

glassfishrobot avatar Mar 16 '11 19:03 glassfishrobot

  • Issue Imported From: https://github.com/jax-rs/api/issues/70
  • Original Issue Raised By:@glassfishrobot
  • Original Issue Assigned To: @glassfishrobot

glassfishrobot avatar Feb 10 '18 21:02 glassfishrobot

@glassfishrobot Commented Reported by robc

glassfishrobot avatar Mar 16 '11 19:03 glassfishrobot

@glassfishrobot Commented @mpotociar said: Out of scope for 2.0. Assigning to the right category and deferring to a future release.

glassfishrobot avatar May 21 '12 19:05 glassfishrobot

@glassfishrobot Commented This issue was imported from java.net JIRA JAX_RS_SPEC-65

glassfishrobot avatar Apr 25 '17 07:04 glassfishrobot

Is there a plan to publish Jersey's Viewable, e.g. under jakarta.ws.rs.ext?

We are developing a code generator that allows using different JAX-RS frameworks and we were was planning to replace RequestDispatcher.forward() method calls with Response.ok(new Viewable()) only to find this will only work in Jersey.

Thanks in advance and hope I am replying to the relevant issue.

berezovskyi avatar Nov 27 '19 14:11 berezovskyi

No, there isn't such a plan.

But you should have a look at JSR 371, which is an action-oriented web framework built on top of JAX-RS. The corresponding specification will go final in the next few weeks and is heavily inspired by Jersey's Viewable.

https://www.mvc-spec.org/

chkal avatar Nov 27 '19 18:11 chkal