users@jersey.java.net

Re: [Jersey] Jersey serving the human web?

From: Casper Bang <casper_at_jbr.dk>
Date: Wed, 1 Apr 2009 00:04:54 +0200

Just a small note regarding the Bookstore application. I've been
unsuccessful in actually running this example under a de-facto standard
Tomcat 6 container. Turns out I was hitting a bug lurking in some JSTL
implementations:
http://www.mularien.com/blog/2008/02/05/tomcat-6014-jstl-12_07-ri-boom-nullpointerexception/

So if you're on Tomcat and want to run Bookstore, make sure your context.xml
looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/Bookstore">
    <Parameter name="com.sun.faces.forceLoadConfiguration" value="true"/>
</Context>

/Casper

2009/3/27 Casper Bang <casper_at_jbr.dk>

> Thanks guys,
>
> Interesting, a handy side effect of using Jersey for this I guess is that
> you end up with 100% statelessness which is rare among common Java web
> frameworks. One dreams of being able to swiftly generate, tweak and deploy a
> client for browsers, if not statically from WADL, then dynamically from
> annotations.
>
> Regards,
> Casper
>
>
> 2009/3/27 Paul Sandoz <Paul.Sandoz_at_sun.com>
>
>
>> On Mar 27, 2009, at 1:35 PM, Lars Tackmann wrote:
>>
>> On Fri, Mar 27, 2009 at 1:04 PM, Casper Bang <casper_at_jbr.dk> wrote:
>>>
>>>> O'Reilly's RESTful Web Services suggests one representation of a
>>>> resource
>>>> could be for the human web, i.e. serving application/xhtml+xml or even
>>>> text/html for people to use directly. While I realize creating webpages
>>>> (however simple) is not the focus of REST or Jersey, I'm trying to
>>>> combine
>>>> it since I've fallen in love with its simplicity (having had painful
>>>> encounters with gigantic and complex JSF stacks in the past).
>>>>
>>>> One problem with this however is that I'm finding myself either writing
>>>> html/css/javascript inside Java Strings and/or serving JSP. I wonder if
>>>> others have taken this path before and if they have any
>>>> recommendations/experiences to share? I expect one possible answer is
>>>> not to
>>>> do it, but rather create another layer for the human web that simple
>>>> consumes the resources. However, I can't help feeling that there could
>>>> be
>>>> space for a simpe human web framework on top of Jersey at a provider
>>>> level.
>>>> Am I wrong?
>>>>
>>>> Thanks in advance,
>>>> Casper
>>>>
>>>>
>>> I have deployed application/xhtml+xml via Jersey commercially in the
>>> Danish telecom industry using XSLT with great success.
>>>
>>
>> Very cool!
>>
>>
>>
>>> The client code was written in prototype and recived the XML/XHTML
>>> representations from Jersey resources.
>>>
>>>
>> Did you integrate the XSLT with Jersey MVC mechanism with a special
>> template processor, or was the layering completely separate?
>>
>> Paul.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>