users@jersey.java.net

Re: [Jersey] Re: Jersey and returning JSPs as html views

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Fri, 10 Sep 2010 12:12:05 +0200

On Sep 9, 2010, at 2:40 AM, Mark Petrovic wrote:

> Reading this now, which is a couple years old
>
> http://blogs.sun.com/sandoz/entry/mvcj
>
> ... but still hoping for a 'state of the art' mini-exposition.
>

It is still pretty much the same. Two additions:

1) Given a resolving class, foo.bar.X say, and a relative template
name t, then Jersey will search for two forms of absolute template name:

   foo/bar/X/t
   foo/bar/X.t

2) @ImplicitProduces can be used on a resource to declare the produced
media type for implicit views.


>
>
> On Sep 8, 2010, at 4:58 PM, Mark Petrovic wrote:
>
>> When I think of mapping html views to servlet responses for
>> purposes of putting together a web site, I think of things like
>> Spring MVC or Struts. But browsing around, I noticed people are
>> using Jersey to return JSP html views, in addition to Jersey
>> implementations of generic RESTful web services.
>>
>> What is the current Jersey state of the art in this area? Are
>> people using Jersey to build full fledged browser-facing sites?

 From what i gather, at the moment, developers are using this for
simple web apps, but i think the concept can apply more to the trend
of HTML+JS+XHTMLRequest (or your favorite JavaScript library). BTW the
concept was copied from Hudson which is a full browser-based app so i
am fairly confident the technique it can be applied to that area.

The Scalate project (templates using Scala) is using the Jersey/JAX-RS
concepts with a view to building full fledged browser-facing sites.

I need to get off my lazy ass and write some documentation in this
area and a define of further work required (one area is improving form
validation).

Paul.