users@jersey.java.net

Re: [Jersey] JSON Validation

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Wed, 31 Mar 2010 18:24:28 +0200

On Wed, Mar 31, 2010 at 09:12:51AM -0700, Chris Carrier wrote:
> Sure just lemme separate something from our app code. Where do
> samples go once I have something? It'll probably be a small maven
> project. On the wiki?

To the subversion repository [1] from where the examples get published at [2].
You need to be able to generate a standalone zip file from your example
project containing all the sources (see e.g.[3]), you can take the config
from the existing example poms there.

~Jakub

[1]https://jersey.dev.java.net/svn/jersey/trunk/jersey/samples
[2]http://download.java.net/maven/2/com/sun/jersey/samples
[3]http://download.java.net/maven/2/com/sun/jersey/samples/helloworld/1.1.5.1/helloworld-1.1.5.1-project.zip

>
> Chris
>
> On Wed, Mar 31, 2010 at 12:53 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
> >
> > On Mar 25, 2010, at 6:45 PM, Tatu Saloranta wrote:
> >
> >> On Thu, Mar 25, 2010 at 9:19 AM, Chris Carrier <ctcarrier_at_gmail.com>
> >> wrote:
> >>>
> >>> Some integration would be cool but most of my problem was not being
> >>> aware of JSR-303 and the Hibernate Validator implementation.  Once I
> >>> annotated my POJO's it was trivial to inject a validator instance with
> >>> Spring and trigger a validation.  It's a small amount of boilerplate
> >>> but so much simpler than the way I was doing it before.  So yeah it
> >>> would be even cooler if validation just happened magically if the POJO
> >>> was annotated with javax.validation tags but it doesn't seem like it
> >>> should be top of the TODO list or anything.
> >>
> >> Cool. That was what I was thinking too -- simple enough for me, so I
> >> did not spent lots of time trying to find ways to save couple of lines
> >> of code. I suspect there are ways to do that, but it wasn't bad enough
> >> itch so to speak.
> >> Perhaps having sample code would be easiest way to further simplify it
> >> for others.
> >>
> >
> > Yes. Chris, if you have any sample code handy or want to contribute a sample
> > that would be most helpful.
> >
> > Paul.
> >
> >> Glad to hear the idea was helpful,
> >>
> >> -+ Tatu +-
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> >> For additional commands, e-mail: users-help_at_jersey.dev.java.net
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> > For additional commands, e-mail: users-help_at_jersey.dev.java.net
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
http://blogs.sun.com/japod