On Dec 10, 2010, at 1:50 AM, cmdotmani wrote:
> Thanks for sharing the bookstore.Â
>
> I am looking for Explicit MVC using Viewable. Can you please tell
> me whether I am making correct progress.
>
Yes you are.
There is also an example with the Devoxx presentation:
http://blogs.sun.com/sandoz/entry/devoxx_presentatons_available
Paul.
> 1) <filter> <filter-name>JerseyFilter</filter-name> <filter-
> class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</
> filter-class> <init-param> <param-
> name>com.sun.jersey.config.feature.Redirect</param-name> <param-
> value>true</param-value> </init-param> <init-param> <param-
> name>com.sun.jersey.config.property.JSPTemplatesBasePath</param-
> name> <param-value>/views/</param-value> </init-param> <init-param>
> <param-name>com.sun.jersey.config.property.WebPageContentRegex</
> param-name> <param-value>/(images|css|jsp)/.*</param-value> </init-
> param> </filter> <filter-mapping> <filter-name>JerseyFilter</filter-
> name> <url-pattern>/myproject/*</url-pattern> </filter-mapping>
>
> So all my resources will start with /myproject/singup..
>
> 2) My resource class
>
> @Path ("/admin") public class AdminUiResource { @GET @Produces
> ("text/html") @Path ("/singup") public Viewable getSignUp ()
> { return new Viewable("/public/signup", "some object here"); }
>
> ...
>
> 3) For post
>
> @POST @Produces ("text/html") @Path ("/singup") public Viewable
> getSignUp (SignUpRequest request) { Â //some logic here by accesing
> request obj
>
> //question. How to I return the success or failure status with error
> message
> // is there a standard way provided by jersey mvc ?
>
> return new Viewable("/public/signup", "some object here"); }
>
>
> Thanks,
>
>
> On Thu, Dec 9, 2010 at 9:58 AM, Paul Sandoz-2 [via Jersey] <[hidden
> email]> wrote:
> On Dec 9, 2010, at 2:53 AM, cmdotmani wrote:
>
> >
> > I am a newbie to Jersey Viewable & JSPTemplateProcessor.
> > My client has an application which exposes api and they want to
> have Â
> > a UI
> > framework from Jersey MVC (using viewable & JSPTemplateProcessor..)
> >
> > Could you please send me a sample code implementation for
> > JSPTemplateProcessor.
> >
> >
> See here:
>
> http://download.java.net/maven/2/com/sun/jersey/samples/bookstore/1.4/bookstore-1.4-project.zip
>
> Paul.
>
>
> View message @ http://jersey.576304.n2.nabble.com/Forward-to-Servlet-tp5351731p5819249.html
> To unsubscribe from Forward to Servlet, click here.
>
>
> View this message in context: Re: Forward to Servlet
> Sent from the Jersey mailing list archive at Nabble.com.