You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Frans Thamura <fr...@meruvian.org> on 2012/08/17 05:15:57 UTC

Q: S2 REST vs JAXRS or S2-JAX-RS plugins

hi all

we are try to adopt the JAX-RS standard to our Struts2 Plugins ,
http://s2restplugins.java.net

our team discover the REST plugin development using JAX-RS is more
easy because REST way, and yes, our solution now all REST, with
Struts2 inside, but several syntax still using the S2 REST plugins).

we on the plan to implement JAX-RS spec inside our plugin, so we have
JAX-RS way in S2.

the issue is , how to know that the JAX-RS implementation in our S2 is
certified. but do we need to certified this?

with JAX-RS inside S2, we have both power of JAX-RS and S2.


but i have another question also

if we have Javascript MVC that consume JSON in total, should we need a
HTML output in MVC?


Frans

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Frans Thamura <fr...@meruvian.org>.
right now, we create /extend the REST plugiin, s2restplugins.java.net

raise the JAX-RS issue , want to know the feedback.

F

On 8/25/12, Dave Newton <da...@gmail.com> wrote:
> On Sat, Aug 25, 2012 at 11:30 AM, Frans Thamura <fr...@meruvian.org> wrote:
>
>> [...] if we use JAX-RS, that means S2 is not relevant anymore.
>>
>
> That's kind of like saying "if I use phillips-head screws my slotted
> screwdriver is not relevant anymore".
>
> It's not relevant until you need a slotty screw.
>
> As more functionality is delegated to the client, action-based frameworks
> are less compelling. Browsers are now a viable platform, so that makes
> sense. S2 makes it easy to graft on functionality for that application
> space, and I still like its request cycle model more than many others.
>
> If you want a specific enhancement to S2 (or the REST plugin), please
> enumerate specifics, preferably in a JIRA ticket so we can edit, clarify,
> elaborate, etc. during the discussion process on the dev list.
>
> Dave
>


-- 
--
Frans Thamura (曽志胜)
Shadow Master and Lead Investor
Meruvian.
Integrated Hypermedia Java Solution Provider.

Mobile: +628557888699
Blog: http://blogs.mervpolis.com/roller/flatburger (id)

FB: http://www.facebook.com/meruvian
TW: http://www.twitter.com/meruvian / @meruvian
Website: http://www.meruvian.org

"We grow because we share the same belief."

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Dave Newton <da...@gmail.com>.
On Sat, Aug 25, 2012 at 11:30 AM, Frans Thamura <fr...@meruvian.org> wrote:

> [...] if we use JAX-RS, that means S2 is not relevant anymore.
>

That's kind of like saying "if I use phillips-head screws my slotted
screwdriver is not relevant anymore".

It's not relevant until you need a slotty screw.

As more functionality is delegated to the client, action-based frameworks
are less compelling. Browsers are now a viable platform, so that makes
sense. S2 makes it easy to graft on functionality for that application
space, and I still like its request cycle model more than many others.

If you want a specific enhancement to S2 (or the REST plugin), please
enumerate specifics, preferably in a JIRA ticket so we can edit, clarify,
elaborate, etc. during the discussion process on the dev list.

Dave

Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Frans Thamura <fr...@meruvian.org>.
we drop sitemesh and put all the decorator to javascript.

and still use velocity and freemarket in several area.

yes, we have plan to make all JS read JSON.. but if we use JAXRS, that
mean S2 is not relevan anymore.

F

On 8/25/12, Martin Gainty <mg...@hotmail.com> wrote:
>
> Hi Frans
> you can use sitemesh to decorate context attributes from either freemarker
> or velocity or jsp templating engines
> so to parse VM marcros map *.vm to VelocityDecoratorServlet as seen here
> <servlet>
>     <servlet-name>sitemesh-velocity</servlet-name>
>
> <servlet-class>org.apache.struts2.sitemesh.VelocityDecoratorServlet</servlet-class>
>     <init-param>
>         <param-name>default_encoding</param-name>
>         <param-value>UTF-8</param-value>
>     </init-param>
>     <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
>     <servlet-name>sitemesh-velocity</servlet-name>
>     <url-pattern>*.vm</url-pattern>
> </servlet-mapping>http://struts.apache.org/2.2.1/docs/sitemesh-plugin.html
>
> is the velocity macro template processing docuementation not clear?
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> de ceci est interdite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>> Date: Sat, 25 Aug 2012 08:16:05 +0700
>> Subject: RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
>> From: frans@meruvian.org
>> To: user@struts.apache.org
>>
>> if jaxrs produce html. can it render in velocity?
>>
>> so the pojo mapped there
>>
>> like struts2 did
>>
>> Frans Thamura
>> Meruvian
>> On Aug 25, 2012 4:00 AM, "Martin Gainty" <mg...@hotmail.com> wrote:
>>
>> >
>> > I guess Im not understanding where the default response of json is
>> > specified from the resteasy-jaxrs if you specify
>> > @Produces("text/html")
>> > your function will output HTML
>> >
>> > as far as Produces.java
>> > public @interface Produces
>> > {
>> >    /**
>> >     * A list of media types. Each entry may specify a single type or
>> > consist
>> >     * of a comma separated list of types. E.g. {"image/jpeg,image/gif",
>> >     * "image/png"}. Use of the comma-separated form allows definition of
>> > a
>> >     * common string constant for use on multiple targets.
>> >     */
>> >    String[] value() default "*/*";
>> > }
>> >
>> > your testcases will use any one of the enumerated MediaType
>> > specifically
>> > ProxyBuilder.build serverMediaType can be TEXT_HTML
>> >
>> >         String url = TestPortProvider.generateURL("/");   //anyone
>> > landing
>> > on Root gets our attention
>> >         Foo foo = ProxyBuilder.build(Foo.class,
>> > url).serverMediaType(MediaType.TEXT_HTML).now();
>> >
>> > MediaTypes can be
>> >
>> >  public final static String WILDCARD = "*/*";
>> >    public final static String APPLICATION_XML = "application/xml";
>> >    public final static String APPLICATION_ATOM_XML =
>> > "application/atom+xml";
>> >    public final static String APPLICATION_XHTML_XML =
>> > "application/xhtml+xml";
>> >    public final static String APPLICATION_SVG_XML =
>> > "application/svg+xml";
>> >    public final static String APPLICATION_JSON = "application/json";
>> >  //one of many but NOT the default
>> >    public final static String APPLICATION_FORM_URLENCODED =
>> > "application-x-www-form-urlencoded";
>> >    public final static String MULTIPART_FORM_DATA =
>> > "multipart/form-data";
>> >    public final static String APPLICATION_OCTET_STREAM =
>> > "application/octet-stream";
>> >    public final static String TEXT_PLAIN = "text/plain";
>> >    public final static String TEXT_XML = "text/xml";
>> >    public final static String TEXT_HTML = "text/html";
>> >
>> > Im not understanding your statement that resteasy-jaxrs will output
>> > only
>> > application/json..could you elaborate where the output default is set?
>> > Martin
>> > ______________________________________________
>> > Verzicht und Vertraulichkeitanmerkung/Note de déni et de
>> > confidentialité
>> >
>> > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
>> > unbefugte
>> > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
>> > Nachricht
>> > dient lediglich dem Austausch von Informationen und entfaltet keine
>> > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>> > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>> > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas
>> > le
>> > destinataire prévu, nous te demandons avec bonté que pour satisfaire
>> > informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
>> > copie
>> > de ceci est interdite. Ce message sert à l'information seulement et
>> > n'aura
>> > pas n'importe quel effet légalement obligatoire. Étant donné que les
>> > email
>> > peuvent facilement être sujets à la manipulation, nous ne pouvons
>> > accepter
>> > aucune responsabilité pour le contenu fourni.
>> >
>> > .
>> > > Date: Fri, 24 Aug 2012 09:46:22 +0700
>> > > Subject: RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
>> > > From: frans@meruvian.org
>> > > To: user@struts.apache.org
>> > >
>> > > we use resteasy also here
>> > >
>> > > but we still develop with html output
>> > >
>> > > result to html from action with rest url naming
>> > >
>> > > resteasy is different approach, output only json.
>> > >
>> > > we use the same Service for both.
>> > >
>> > > and want a smiliar url for rest
>> > > On Aug 24, 2012 9:22 AM, "Martin Gainty" <mg...@hotmail.com> wrote:
>> > >
>> > > >
>> > > > Frans
>> > > >
>> > > > grab what you need from
>> > > > https://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs
>> > > > cd jaxrs-api
>> > > > mvn -e -X compile
>> > > > mvn -e -X package
>> > > > mvn -e -X install:install-file
>> > > > mvn -e -X deploy:deploy-file
>> > > >
>> > > > add the dependency to your dependencies list
>> > > > <dependencies>
>> > > > <dependency>
>> > > >     <groupId>org.jboss.resteasy</groupId>
>> > > >     <artifactId>jaxrs-api</artifactId>
>> > > >     <version>2.3.4.Final</version>
>> > > > </dependency>
>> > > > ....
>> > > >
>> > > > then annotate your code.. resteasy-jaxrs provides you these
>> > > > annotations
>> > > >     @Path("/")        //javax.ws.rs.Path
>> > > >     @GET               //javax.ws.rs.GET
>> > > >     @Produces("application/json")    //javax.ws.rs.Produces
>> > > >
>> > > > anything missing?
>> > > > Martin
>> > > > ______________________________________________
>> > > > Verzicht und Vertraulichkeitanmerkung/Note de déni et de
>> > confidentialité
>> > > >
>> > > > Diese Nachricht ist vertraulich.  Sie nicht der vorgesehene
>> > > > Empfaenger
>> > > > sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>> > > > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
>> > Nachricht
>> > > > dient lediglich dem Austausch von Informationen und entfaltet keine
>> > > > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit
>> > > > von
>> > > > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>> > > > Ce message est confidentiel et peut être privilégié. Si vous n'êtes
>> > pas le
>> > > > destinataire prévu, nous te demandons avec bonté que pour
>> > > > satisfaire
>> > > > informez l'expéditeur. N'importe quelle diffusion non autorisée ou
>> > > > la
>> > copie
>> > > > de ceci est interdite. Ce message sert à l'information seulement et
>> > n'aura
>> > > > pas n'importe quel effet légalement obligatoire. Étant donné que
>> > > > les
>> > email
>> > > > peuvent facilement être sujets à la manipulation, nous ne pouvons
>> > accepter
>> > > > aucune responsabilité pour le contenu fourni.
>> > > >
>> > > >
>> > > > > Date: Fri, 24 Aug 2012 03:17:05 +0700
>> > > > > Subject: Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
>> > > > > From: frans@meruvian.org
>> > > > > To: user@struts.apache.org
>> > > > >
>> > > > > any idea to use resteasy with s2?
>> > > > >
>> > > > > esp to use the url pattern of rest (blabla/blabla) with Action
>> > > > > On Aug 23, 2012 12:53 PM, "Lukasz Lenart"
>> > > > > <lu...@apache.org>
>> > > > wrote:
>> > > > >
>> > > > > > But I think you can always use RESTeasy and get the same value
>> > without
>> > > > > > needs for custom plugin. I don't see a point to have another
>> > > > > > JAX-RS
>> > > > > > implementation on the market.
>> > > > > >
>> > > > > >
>> > > > > > Regards
>> > > > > > --
>> > > > > > Łukasz
>> > > > > > + 48 606 323 122 http://www.lenart.org.pl/
>> > > > > >
>> > > > > >
>> > > > > > 2012/8/21 Frans Thamura <fr...@meruvian.org>:
>> > > > > > > yes
>> > > > > > >
>> > > > > > > righr now the syntax is @result and @action
>> > > > > > >
>> > > > > > > i think if we have more like @get etc
>> > > > > > >
>> > > > > > > that make it more powerfull
>> > > > > > >
>> > > > > > > On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <
>> > lukasz.lenart@gmail.com>
>> > > > > > wrote:
>> > > > > > >>
>> > > > > > >> Hi,
>> > > > > > >>
>> > > > > > >> I'm not sure if I understand, you just want implement JAX-RS
>> > > > > > >> as
>> > a
>> > > > > > >> Struts 2 plugin ?
>> > > > > > >>
>> > > > > > >>
>> > > > > > >> Regards
>> > > > > > >> --
>> > > > > > >> Łukasz
>> > > > > > >> mobile +48 606 323 122 http://www.lenart.org.pl/
>> > > > > > >> Warszawa JUG conference - Confitura http://confitura.pl/
>> > > > > > >>
>> > > > > > >>
>> > > > ---------------------------------------------------------------------
>> > > > > > >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > > > > > >> For additional commands, e-mail: user-help@struts.apache.org
>> > > > > > >>
>> > > > > > >
>> > > > > >
>> > > > > >
>> > ---------------------------------------------------------------------
>> > > > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > > > > > For additional commands, e-mail: user-help@struts.apache.org
>> > > > > >
>> > > > > >
>> > > >
>> >
>  		 	   		


-- 
--
Frans Thamura (曽志胜)
Shadow Master and Lead Investor
Meruvian.
Integrated Hypermedia Java Solution Provider.

Mobile: +628557888699
Blog: http://blogs.mervpolis.com/roller/flatburger (id)

FB: http://www.facebook.com/meruvian
TW: http://www.twitter.com/meruvian / @meruvian
Website: http://www.meruvian.org

"We grow because we share the same belief."

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Martin Gainty <mg...@hotmail.com>.
Hi Frans
you can use sitemesh to decorate context attributes from either freemarker or velocity or jsp templating engines 
so to parse VM marcros map *.vm to VelocityDecoratorServlet as seen here
<servlet>
    <servlet-name>sitemesh-velocity</servlet-name>
    <servlet-class>org.apache.struts2.sitemesh.VelocityDecoratorServlet</servlet-class>
    <init-param>
        <param-name>default_encoding</param-name>
        <param-value>UTF-8</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>sitemesh-velocity</servlet-name>
    <url-pattern>*.vm</url-pattern>
</servlet-mapping>http://struts.apache.org/2.2.1/docs/sitemesh-plugin.html

is the velocity macro template processing docuementation not clear?
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

> Date: Sat, 25 Aug 2012 08:16:05 +0700
> Subject: RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> From: frans@meruvian.org
> To: user@struts.apache.org
> 
> if jaxrs produce html. can it render in velocity?
> 
> so the pojo mapped there
> 
> like struts2 did
> 
> Frans Thamura
> Meruvian
> On Aug 25, 2012 4:00 AM, "Martin Gainty" <mg...@hotmail.com> wrote:
> 
> >
> > I guess Im not understanding where the default response of json is
> > specified from the resteasy-jaxrs if you specify
> > @Produces("text/html")
> > your function will output HTML
> >
> > as far as Produces.java
> > public @interface Produces
> > {
> >    /**
> >     * A list of media types. Each entry may specify a single type or
> > consist
> >     * of a comma separated list of types. E.g. {"image/jpeg,image/gif",
> >     * "image/png"}. Use of the comma-separated form allows definition of a
> >     * common string constant for use on multiple targets.
> >     */
> >    String[] value() default "*/*";
> > }
> >
> > your testcases will use any one of the enumerated MediaType specifically
> > ProxyBuilder.build serverMediaType can be TEXT_HTML
> >
> >         String url = TestPortProvider.generateURL("/");   //anyone landing
> > on Root gets our attention
> >         Foo foo = ProxyBuilder.build(Foo.class,
> > url).serverMediaType(MediaType.TEXT_HTML).now();
> >
> > MediaTypes can be
> >
> >  public final static String WILDCARD = "*/*";
> >    public final static String APPLICATION_XML = "application/xml";
> >    public final static String APPLICATION_ATOM_XML =
> > "application/atom+xml";
> >    public final static String APPLICATION_XHTML_XML =
> > "application/xhtml+xml";
> >    public final static String APPLICATION_SVG_XML = "application/svg+xml";
> >    public final static String APPLICATION_JSON = "application/json";
> >  //one of many but NOT the default
> >    public final static String APPLICATION_FORM_URLENCODED =
> > "application-x-www-form-urlencoded";
> >    public final static String MULTIPART_FORM_DATA = "multipart/form-data";
> >    public final static String APPLICATION_OCTET_STREAM =
> > "application/octet-stream";
> >    public final static String TEXT_PLAIN = "text/plain";
> >    public final static String TEXT_XML = "text/xml";
> >    public final static String TEXT_HTML = "text/html";
> >
> > Im not understanding your statement that resteasy-jaxrs will output only
> > application/json..could you elaborate where the output default is set?
> > Martin
> > ______________________________________________
> > Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
> >
> > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> > dient lediglich dem Austausch von Informationen und entfaltet keine
> > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> > destinataire prévu, nous te demandons avec bonté que pour satisfaire
> > informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> > de ceci est interdite. Ce message sert à l'information seulement et n'aura
> > pas n'importe quel effet légalement obligatoire. Étant donné que les email
> > peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> > aucune responsabilité pour le contenu fourni.
> >
> > .
> > > Date: Fri, 24 Aug 2012 09:46:22 +0700
> > > Subject: RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> > > From: frans@meruvian.org
> > > To: user@struts.apache.org
> > >
> > > we use resteasy also here
> > >
> > > but we still develop with html output
> > >
> > > result to html from action with rest url naming
> > >
> > > resteasy is different approach, output only json.
> > >
> > > we use the same Service for both.
> > >
> > > and want a smiliar url for rest
> > > On Aug 24, 2012 9:22 AM, "Martin Gainty" <mg...@hotmail.com> wrote:
> > >
> > > >
> > > > Frans
> > > >
> > > > grab what you need from
> > > > https://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs
> > > > cd jaxrs-api
> > > > mvn -e -X compile
> > > > mvn -e -X package
> > > > mvn -e -X install:install-file
> > > > mvn -e -X deploy:deploy-file
> > > >
> > > > add the dependency to your dependencies list
> > > > <dependencies>
> > > > <dependency>
> > > >     <groupId>org.jboss.resteasy</groupId>
> > > >     <artifactId>jaxrs-api</artifactId>
> > > >     <version>2.3.4.Final</version>
> > > > </dependency>
> > > > ....
> > > >
> > > > then annotate your code.. resteasy-jaxrs provides you these annotations
> > > >     @Path("/")        //javax.ws.rs.Path
> > > >     @GET               //javax.ws.rs.GET
> > > >     @Produces("application/json")    //javax.ws.rs.Produces
> > > >
> > > > anything missing?
> > > > Martin
> > > > ______________________________________________
> > > > Verzicht und Vertraulichkeitanmerkung/Note de déni et de
> > confidentialité
> > > >
> > > > Diese Nachricht ist vertraulich.  Sie nicht der vorgesehene Empfaenger
> > > > sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> > > > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
> > Nachricht
> > > > dient lediglich dem Austausch von Informationen und entfaltet keine
> > > > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> > > > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> > > > Ce message est confidentiel et peut être privilégié. Si vous n'êtes
> > pas le
> > > > destinataire prévu, nous te demandons avec bonté que pour satisfaire
> > > > informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
> > copie
> > > > de ceci est interdite. Ce message sert à l'information seulement et
> > n'aura
> > > > pas n'importe quel effet légalement obligatoire. Étant donné que les
> > email
> > > > peuvent facilement être sujets à la manipulation, nous ne pouvons
> > accepter
> > > > aucune responsabilité pour le contenu fourni.
> > > >
> > > >
> > > > > Date: Fri, 24 Aug 2012 03:17:05 +0700
> > > > > Subject: Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> > > > > From: frans@meruvian.org
> > > > > To: user@struts.apache.org
> > > > >
> > > > > any idea to use resteasy with s2?
> > > > >
> > > > > esp to use the url pattern of rest (blabla/blabla) with Action
> > > > > On Aug 23, 2012 12:53 PM, "Lukasz Lenart" <lu...@apache.org>
> > > > wrote:
> > > > >
> > > > > > But I think you can always use RESTeasy and get the same value
> > without
> > > > > > needs for custom plugin. I don't see a point to have another JAX-RS
> > > > > > implementation on the market.
> > > > > >
> > > > > >
> > > > > > Regards
> > > > > > --
> > > > > > Łukasz
> > > > > > + 48 606 323 122 http://www.lenart.org.pl/
> > > > > >
> > > > > >
> > > > > > 2012/8/21 Frans Thamura <fr...@meruvian.org>:
> > > > > > > yes
> > > > > > >
> > > > > > > righr now the syntax is @result and @action
> > > > > > >
> > > > > > > i think if we have more like @get etc
> > > > > > >
> > > > > > > that make it more powerfull
> > > > > > >
> > > > > > > On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <
> > lukasz.lenart@gmail.com>
> > > > > > wrote:
> > > > > > >>
> > > > > > >> Hi,
> > > > > > >>
> > > > > > >> I'm not sure if I understand, you just want implement JAX-RS as
> > a
> > > > > > >> Struts 2 plugin ?
> > > > > > >>
> > > > > > >>
> > > > > > >> Regards
> > > > > > >> --
> > > > > > >> Łukasz
> > > > > > >> mobile +48 606 323 122 http://www.lenart.org.pl/
> > > > > > >> Warszawa JUG conference - Confitura http://confitura.pl/
> > > > > > >>
> > > > > > >>
> > > > ---------------------------------------------------------------------
> > > > > > >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > > > >> For additional commands, e-mail: user-help@struts.apache.org
> > > > > > >>
> > > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > > > For additional commands, e-mail: user-help@struts.apache.org
> > > > > >
> > > > > >
> > > >
> >
 		 	   		  

RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Frans Thamura <fr...@meruvian.org>.
if jaxrs produce html. can it render in velocity?

so the pojo mapped there

like struts2 did

Frans Thamura
Meruvian
On Aug 25, 2012 4:00 AM, "Martin Gainty" <mg...@hotmail.com> wrote:

>
> I guess Im not understanding where the default response of json is
> specified from the resteasy-jaxrs if you specify
> @Produces("text/html")
> your function will output HTML
>
> as far as Produces.java
> public @interface Produces
> {
>    /**
>     * A list of media types. Each entry may specify a single type or
> consist
>     * of a comma separated list of types. E.g. {"image/jpeg,image/gif",
>     * "image/png"}. Use of the comma-separated form allows definition of a
>     * common string constant for use on multiple targets.
>     */
>    String[] value() default "*/*";
> }
>
> your testcases will use any one of the enumerated MediaType specifically
> ProxyBuilder.build serverMediaType can be TEXT_HTML
>
>         String url = TestPortProvider.generateURL("/");   //anyone landing
> on Root gets our attention
>         Foo foo = ProxyBuilder.build(Foo.class,
> url).serverMediaType(MediaType.TEXT_HTML).now();
>
> MediaTypes can be
>
>  public final static String WILDCARD = "*/*";
>    public final static String APPLICATION_XML = "application/xml";
>    public final static String APPLICATION_ATOM_XML =
> "application/atom+xml";
>    public final static String APPLICATION_XHTML_XML =
> "application/xhtml+xml";
>    public final static String APPLICATION_SVG_XML = "application/svg+xml";
>    public final static String APPLICATION_JSON = "application/json";
>  //one of many but NOT the default
>    public final static String APPLICATION_FORM_URLENCODED =
> "application-x-www-form-urlencoded";
>    public final static String MULTIPART_FORM_DATA = "multipart/form-data";
>    public final static String APPLICATION_OCTET_STREAM =
> "application/octet-stream";
>    public final static String TEXT_PLAIN = "text/plain";
>    public final static String TEXT_XML = "text/xml";
>    public final static String TEXT_HTML = "text/html";
>
> Im not understanding your statement that resteasy-jaxrs will output only
> application/json..could you elaborate where the output default is set?
> Martin
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> de ceci est interdite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
> .
> > Date: Fri, 24 Aug 2012 09:46:22 +0700
> > Subject: RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> > From: frans@meruvian.org
> > To: user@struts.apache.org
> >
> > we use resteasy also here
> >
> > but we still develop with html output
> >
> > result to html from action with rest url naming
> >
> > resteasy is different approach, output only json.
> >
> > we use the same Service for both.
> >
> > and want a smiliar url for rest
> > On Aug 24, 2012 9:22 AM, "Martin Gainty" <mg...@hotmail.com> wrote:
> >
> > >
> > > Frans
> > >
> > > grab what you need from
> > > https://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs
> > > cd jaxrs-api
> > > mvn -e -X compile
> > > mvn -e -X package
> > > mvn -e -X install:install-file
> > > mvn -e -X deploy:deploy-file
> > >
> > > add the dependency to your dependencies list
> > > <dependencies>
> > > <dependency>
> > >     <groupId>org.jboss.resteasy</groupId>
> > >     <artifactId>jaxrs-api</artifactId>
> > >     <version>2.3.4.Final</version>
> > > </dependency>
> > > ....
> > >
> > > then annotate your code.. resteasy-jaxrs provides you these annotations
> > >     @Path("/")        //javax.ws.rs.Path
> > >     @GET               //javax.ws.rs.GET
> > >     @Produces("application/json")    //javax.ws.rs.Produces
> > >
> > > anything missing?
> > > Martin
> > > ______________________________________________
> > > Verzicht und Vertraulichkeitanmerkung/Note de déni et de
> confidentialité
> > >
> > > Diese Nachricht ist vertraulich.  Sie nicht der vorgesehene Empfaenger
> > > sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> > > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
> Nachricht
> > > dient lediglich dem Austausch von Informationen und entfaltet keine
> > > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> > > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> > > Ce message est confidentiel et peut être privilégié. Si vous n'êtes
> pas le
> > > destinataire prévu, nous te demandons avec bonté que pour satisfaire
> > > informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
> copie
> > > de ceci est interdite. Ce message sert à l'information seulement et
> n'aura
> > > pas n'importe quel effet légalement obligatoire. Étant donné que les
> email
> > > peuvent facilement être sujets à la manipulation, nous ne pouvons
> accepter
> > > aucune responsabilité pour le contenu fourni.
> > >
> > >
> > > > Date: Fri, 24 Aug 2012 03:17:05 +0700
> > > > Subject: Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> > > > From: frans@meruvian.org
> > > > To: user@struts.apache.org
> > > >
> > > > any idea to use resteasy with s2?
> > > >
> > > > esp to use the url pattern of rest (blabla/blabla) with Action
> > > > On Aug 23, 2012 12:53 PM, "Lukasz Lenart" <lu...@apache.org>
> > > wrote:
> > > >
> > > > > But I think you can always use RESTeasy and get the same value
> without
> > > > > needs for custom plugin. I don't see a point to have another JAX-RS
> > > > > implementation on the market.
> > > > >
> > > > >
> > > > > Regards
> > > > > --
> > > > > Łukasz
> > > > > + 48 606 323 122 http://www.lenart.org.pl/
> > > > >
> > > > >
> > > > > 2012/8/21 Frans Thamura <fr...@meruvian.org>:
> > > > > > yes
> > > > > >
> > > > > > righr now the syntax is @result and @action
> > > > > >
> > > > > > i think if we have more like @get etc
> > > > > >
> > > > > > that make it more powerfull
> > > > > >
> > > > > > On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <
> lukasz.lenart@gmail.com>
> > > > > wrote:
> > > > > >>
> > > > > >> Hi,
> > > > > >>
> > > > > >> I'm not sure if I understand, you just want implement JAX-RS as
> a
> > > > > >> Struts 2 plugin ?
> > > > > >>
> > > > > >>
> > > > > >> Regards
> > > > > >> --
> > > > > >> Łukasz
> > > > > >> mobile +48 606 323 122 http://www.lenart.org.pl/
> > > > > >> Warszawa JUG conference - Confitura http://confitura.pl/
> > > > > >>
> > > > > >>
> > > ---------------------------------------------------------------------
> > > > > >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > > >> For additional commands, e-mail: user-help@struts.apache.org
> > > > > >>
> > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > > For additional commands, e-mail: user-help@struts.apache.org
> > > > >
> > > > >
> > >
>

RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Martin Gainty <mg...@hotmail.com>.
I guess Im not understanding where the default response of json is specified from the resteasy-jaxrs if you specify 
@Produces("text/html")
your function will output HTML

as far as Produces.java
public @interface Produces
{
   /**
    * A list of media types. Each entry may specify a single type or consist
    * of a comma separated list of types. E.g. {"image/jpeg,image/gif",
    * "image/png"}. Use of the comma-separated form allows definition of a
    * common string constant for use on multiple targets.
    */
   String[] value() default "*/*";
}

your testcases will use any one of the enumerated MediaType specifically ProxyBuilder.build serverMediaType can be TEXT_HTML

        String url = TestPortProvider.generateURL("/");   //anyone landing on Root gets our attention
        Foo foo = ProxyBuilder.build(Foo.class, url).serverMediaType(MediaType.TEXT_HTML).now();

MediaTypes can be

 public final static String WILDCARD = "*/*";
   public final static String APPLICATION_XML = "application/xml";
   public final static String APPLICATION_ATOM_XML = "application/atom+xml";
   public final static String APPLICATION_XHTML_XML = "application/xhtml+xml";
   public final static String APPLICATION_SVG_XML = "application/svg+xml";
   public final static String APPLICATION_JSON = "application/json";    //one of many but NOT the default
   public final static String APPLICATION_FORM_URLENCODED = "application-x-www-form-urlencoded";
   public final static String MULTIPART_FORM_DATA = "multipart/form-data";
   public final static String APPLICATION_OCTET_STREAM = "application/octet-stream";
   public final static String TEXT_PLAIN = "text/plain";
   public final static String TEXT_XML = "text/xml";
   public final static String TEXT_HTML = "text/html";

Im not understanding your statement that resteasy-jaxrs will output only application/json..could you elaborate where the output default is set?
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

.
> Date: Fri, 24 Aug 2012 09:46:22 +0700
> Subject: RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> From: frans@meruvian.org
> To: user@struts.apache.org
> 
> we use resteasy also here
> 
> but we still develop with html output
> 
> result to html from action with rest url naming
> 
> resteasy is different approach, output only json.
> 
> we use the same Service for both.
> 
> and want a smiliar url for rest
> On Aug 24, 2012 9:22 AM, "Martin Gainty" <mg...@hotmail.com> wrote:
> 
> >
> > Frans
> >
> > grab what you need from
> > https://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs
> > cd jaxrs-api
> > mvn -e -X compile
> > mvn -e -X package
> > mvn -e -X install:install-file
> > mvn -e -X deploy:deploy-file
> >
> > add the dependency to your dependencies list
> > <dependencies>
> > <dependency>
> >     <groupId>org.jboss.resteasy</groupId>
> >     <artifactId>jaxrs-api</artifactId>
> >     <version>2.3.4.Final</version>
> > </dependency>
> > ....
> >
> > then annotate your code.. resteasy-jaxrs provides you these annotations
> >     @Path("/")        //javax.ws.rs.Path
> >     @GET               //javax.ws.rs.GET
> >     @Produces("application/json")    //javax.ws.rs.Produces
> >
> > anything missing?
> > Martin
> > ______________________________________________
> > Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
> >
> > Diese Nachricht ist vertraulich.  Sie nicht der vorgesehene Empfaenger
> > sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> > dient lediglich dem Austausch von Informationen und entfaltet keine
> > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> > destinataire prévu, nous te demandons avec bonté que pour satisfaire
> > informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> > de ceci est interdite. Ce message sert à l'information seulement et n'aura
> > pas n'importe quel effet légalement obligatoire. Étant donné que les email
> > peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> > aucune responsabilité pour le contenu fourni.
> >
> >
> > > Date: Fri, 24 Aug 2012 03:17:05 +0700
> > > Subject: Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> > > From: frans@meruvian.org
> > > To: user@struts.apache.org
> > >
> > > any idea to use resteasy with s2?
> > >
> > > esp to use the url pattern of rest (blabla/blabla) with Action
> > > On Aug 23, 2012 12:53 PM, "Lukasz Lenart" <lu...@apache.org>
> > wrote:
> > >
> > > > But I think you can always use RESTeasy and get the same value without
> > > > needs for custom plugin. I don't see a point to have another JAX-RS
> > > > implementation on the market.
> > > >
> > > >
> > > > Regards
> > > > --
> > > > Łukasz
> > > > + 48 606 323 122 http://www.lenart.org.pl/
> > > >
> > > >
> > > > 2012/8/21 Frans Thamura <fr...@meruvian.org>:
> > > > > yes
> > > > >
> > > > > righr now the syntax is @result and @action
> > > > >
> > > > > i think if we have more like @get etc
> > > > >
> > > > > that make it more powerfull
> > > > >
> > > > > On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <lu...@gmail.com>
> > > > wrote:
> > > > >>
> > > > >> Hi,
> > > > >>
> > > > >> I'm not sure if I understand, you just want implement JAX-RS as a
> > > > >> Struts 2 plugin ?
> > > > >>
> > > > >>
> > > > >> Regards
> > > > >> --
> > > > >> Łukasz
> > > > >> mobile +48 606 323 122 http://www.lenart.org.pl/
> > > > >> Warszawa JUG conference - Confitura http://confitura.pl/
> > > > >>
> > > > >>
> > ---------------------------------------------------------------------
> > > > >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > >> For additional commands, e-mail: user-help@struts.apache.org
> > > > >>
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > >
> >
 		 	   		  

RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Frans Thamura <fr...@meruvian.org>.
we use resteasy also here

but we still develop with html output

result to html from action with rest url naming

resteasy is different approach, output only json.

we use the same Service for both.

and want a smiliar url for rest
On Aug 24, 2012 9:22 AM, "Martin Gainty" <mg...@hotmail.com> wrote:

>
> Frans
>
> grab what you need from
> https://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs
> cd jaxrs-api
> mvn -e -X compile
> mvn -e -X package
> mvn -e -X install:install-file
> mvn -e -X deploy:deploy-file
>
> add the dependency to your dependencies list
> <dependencies>
> <dependency>
>     <groupId>org.jboss.resteasy</groupId>
>     <artifactId>jaxrs-api</artifactId>
>     <version>2.3.4.Final</version>
> </dependency>
> ....
>
> then annotate your code.. resteasy-jaxrs provides you these annotations
>     @Path("/")        //javax.ws.rs.Path
>     @GET               //javax.ws.rs.GET
>     @Produces("application/json")    //javax.ws.rs.Produces
>
> anything missing?
> Martin
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich.  Sie nicht der vorgesehene Empfaenger
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> de ceci est interdite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>
> > Date: Fri, 24 Aug 2012 03:17:05 +0700
> > Subject: Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> > From: frans@meruvian.org
> > To: user@struts.apache.org
> >
> > any idea to use resteasy with s2?
> >
> > esp to use the url pattern of rest (blabla/blabla) with Action
> > On Aug 23, 2012 12:53 PM, "Lukasz Lenart" <lu...@apache.org>
> wrote:
> >
> > > But I think you can always use RESTeasy and get the same value without
> > > needs for custom plugin. I don't see a point to have another JAX-RS
> > > implementation on the market.
> > >
> > >
> > > Regards
> > > --
> > > Łukasz
> > > + 48 606 323 122 http://www.lenart.org.pl/
> > >
> > >
> > > 2012/8/21 Frans Thamura <fr...@meruvian.org>:
> > > > yes
> > > >
> > > > righr now the syntax is @result and @action
> > > >
> > > > i think if we have more like @get etc
> > > >
> > > > that make it more powerfull
> > > >
> > > > On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <lu...@gmail.com>
> > > wrote:
> > > >>
> > > >> Hi,
> > > >>
> > > >> I'm not sure if I understand, you just want implement JAX-RS as a
> > > >> Struts 2 plugin ?
> > > >>
> > > >>
> > > >> Regards
> > > >> --
> > > >> Łukasz
> > > >> mobile +48 606 323 122 http://www.lenart.org.pl/
> > > >> Warszawa JUG conference - Confitura http://confitura.pl/
> > > >>
> > > >>
> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > >> For additional commands, e-mail: user-help@struts.apache.org
> > > >>
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
>

RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Martin Gainty <mg...@hotmail.com>.
Frans

grab what you need from
https://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs
cd jaxrs-api
mvn -e -X compile
mvn -e -X package
mvn -e -X install:install-file
mvn -e -X deploy:deploy-file

add the dependency to your dependencies list
<dependencies>
<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>jaxrs-api</artifactId>
    <version>2.3.4.Final</version>
</dependency>
....

then annotate your code.. resteasy-jaxrs provides you these annotations
    @Path("/")        //javax.ws.rs.Path
    @GET               //javax.ws.rs.GET
    @Produces("application/json")    //javax.ws.rs.Produces

anything missing?
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich.  Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.


> Date: Fri, 24 Aug 2012 03:17:05 +0700
> Subject: Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> From: frans@meruvian.org
> To: user@struts.apache.org
> 
> any idea to use resteasy with s2?
> 
> esp to use the url pattern of rest (blabla/blabla) with Action
> On Aug 23, 2012 12:53 PM, "Lukasz Lenart" <lu...@apache.org> wrote:
> 
> > But I think you can always use RESTeasy and get the same value without
> > needs for custom plugin. I don't see a point to have another JAX-RS
> > implementation on the market.
> >
> >
> > Regards
> > --
> > Łukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> >
> > 2012/8/21 Frans Thamura <fr...@meruvian.org>:
> > > yes
> > >
> > > righr now the syntax is @result and @action
> > >
> > > i think if we have more like @get etc
> > >
> > > that make it more powerfull
> > >
> > > On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <lu...@gmail.com>
> > wrote:
> > >>
> > >> Hi,
> > >>
> > >> I'm not sure if I understand, you just want implement JAX-RS as a
> > >> Struts 2 plugin ?
> > >>
> > >>
> > >> Regards
> > >> --
> > >> Łukasz
> > >> mobile +48 606 323 122 http://www.lenart.org.pl/
> > >> Warszawa JUG conference - Confitura http://confitura.pl/
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > >> For additional commands, e-mail: user-help@struts.apache.org
> > >>
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
 		 	   		  

Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Frans Thamura <fr...@meruvian.org>.
any idea to use resteasy with s2?

esp to use the url pattern of rest (blabla/blabla) with Action
On Aug 23, 2012 12:53 PM, "Lukasz Lenart" <lu...@apache.org> wrote:

> But I think you can always use RESTeasy and get the same value without
> needs for custom plugin. I don't see a point to have another JAX-RS
> implementation on the market.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
>
> 2012/8/21 Frans Thamura <fr...@meruvian.org>:
> > yes
> >
> > righr now the syntax is @result and @action
> >
> > i think if we have more like @get etc
> >
> > that make it more powerfull
> >
> > On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <lu...@gmail.com>
> wrote:
> >>
> >> Hi,
> >>
> >> I'm not sure if I understand, you just want implement JAX-RS as a
> >> Struts 2 plugin ?
> >>
> >>
> >> Regards
> >> --
> >> Łukasz
> >> mobile +48 606 323 122 http://www.lenart.org.pl/
> >> Warszawa JUG conference - Confitura http://confitura.pl/
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Spam: RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Frans Thamura <fr...@meruvian.org>.
my case.

we use struts2 (spring and hibernate ), so the Action has been linked
with hibernate and POJO, and work quiet good.

the result is JSON.. the URL naming from .action become REST
(blabla/param/1/2/3), and work well, take a look Mutiara-iman.org,

and the method is using @Action and @Result, which we extend from REST plugins

We (my team) think that using JAXRS is more better vs the @Action, and
we want to adopt it in our Struts2, to complement the @ACtion and
@Result.

we know that JAXRS is not support the plugins model like Struts2, and
the output is not like S2 (Chart, JSON, HTML), can can use velocity as
rendering.

we want the JAXRS way in our Struts2 Development and render to
Velocity, and if the result =json , it work like current JAXRS API
(REST Easy way)


that is the idea

F

On 8/24/12, Joseph Mocker <jm...@velti.com> wrote:
> In our case it was with Tomcat.
>
>
>
> On Aug 23, 2012, at 11:21 AM, Martin Gainty wrote:
>
>>
>> JBoss or Tomcat?
>>
>> Martin
>> ______________________________________________
>> ..place longwinded disclaimer here...
>>
>>
>>> From: jmocker@velti.com
>>> To: user@struts.apache.org
>>> Subject: Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
>>> Date: Thu, 23 Aug 2012 18:06:24 +0000
>>>
>>> �I agree, don't quite understand when you could use RESTeasy or Jersey in
>>> conjunction with Struts in the same web app.
>>>
>>> I had written previously that we have a Jersey + Struts2 app running
>>> nicely.
>>>
>>>  --joe
>>>
>>>
>>> Joseph Mocker   |   Velti   |   Senior Software Architect
>>> t +1.650.566.7033   m +1.408.676.6625
>>> e jmocker@velti.com   @Mobclix
>>>
>>> The leading global technology provider of
>>> mobile marketing and advertising solutions
>>>
>>> On Aug 22, 2012, at 10:53 PM, Lukasz Lenart wrote:
>>>
>>>> But I think you can always use RESTeasy and get the same value without
>>>> needs for custom plugin. I don't see a point to have another JAX-RS
>>>> implementation on the market.
>>>>
>>>>
>>>> Regards
>>>> --
>>>> Łukasz
>>>> + 48 606 323 122 http://www.lenart.org.pl/
>>>>
>>>>
>>>> 2012/8/21 Frans Thamura <fr...@meruvian.org>:
>>>>> yes
>>>>>
>>>>> righr now the syntax is @result and @action
>>>>>
>>>>> i think if we have more like @get etc
>>>>>
>>>>> that make it more powerfull
>>>>>
>>>>> On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <lu...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm not sure if I understand, you just want implement JAX-RS as a
>>>>>> Struts 2 plugin ?
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>> --
>>>>>> Łukasz
>>>>>> mobile +48 606 323 122 http://www.lenart.org.pl/
>>>>>> Warszawa JUG conference - Confitura http://confitura.pl/
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>
>>> �Т���������������������������������������������������������������������ХF�
>>> V�7V'67&�&R� R�� �â W6W"�V�7V'67&�&T 7G'WG2�   6�R��&pФf�"  FF�F��� �
>>> 6��� �G2� R�� �â W6W"ֆV�  7G'WG2�   6�R��&p
>> 		 	   		
>
>


-- 
--
Frans Thamura (曽志胜)
Shadow Master and Lead Investor
Meruvian.
Integrated Hypermedia Java Solution Provider.

Mobile: +628557888699
Blog: http://blogs.mervpolis.com/roller/flatburger (id)

FB: http://www.facebook.com/meruvian
TW: http://www.twitter.com/meruvian / @meruvian
Website: http://www.meruvian.org

"We grow because we share the same belief."

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Spam: RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Martin Gainty <mg...@hotmail.com>.
I wanted to setup a JAX-RS test environment and I thought I would follow your lead

Thanks Joseph!
Martin Gainty 
______________________________________________ 
...place longwinded disclaimer here...


> From: jmocker@velti.com
> To: user@struts.apache.org
> Subject: Re: Spam: RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> Date: Fri, 24 Aug 2012 15:34:57 +0000
> 
> In our case it was with Tomcat.
> 
> 
> 
> On Aug 23, 2012, at 11:21 AM, Martin Gainty wrote:
> 
> > 
> > JBoss or Tomcat?
> > 
> > Martin 
> > ______________________________________________ 
> > ..place longwinded disclaimer here...
> > 
> > 
> >> From: jmocker@velti.com
> >> To: user@struts.apache.org
> >> Subject: Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> >> Date: Thu, 23 Aug 2012 18:06:24 +0000
> >> 
> >> �I agree, don't quite understand when you could use RESTeasy or Jersey in conjunction with Struts in the same web app.
> >> 
> >> I had written previously that we have a Jersey + Struts2 app running nicely.
> >> 
> >>  --joe
> >> 
> >> 
> >> Joseph Mocker   |   Velti   |   Senior Software Architect
> >> t +1.650.566.7033   m +1.408.676.6625
> >> e jmocker@velti.com   @Mobclix
> >> 
> >> The leading global technology provider of
> >> mobile marketing and advertising solutions
> >> 
> >> On Aug 22, 2012, at 10:53 PM, Lukasz Lenart wrote:
> >> 
> >>> But I think you can always use RESTeasy and get the same value without
> >>> needs for custom plugin. I don't see a point to have another JAX-RS
> >>> implementation on the market.
> >>> 
> >>> 
> >>> Regards
> >>> --
> >>> Łukasz
> >>> + 48 606 323 122 http://www.lenart.org.pl/
> >>> 
> >>> 
> >>> 2012/8/21 Frans Thamura <fr...@meruvian.org>:
> >>>> yes
> >>>> 
> >>>> righr now the syntax is @result and @action
> >>>> 
> >>>> i think if we have more like @get etc
> >>>> 
> >>>> that make it more powerfull
> >>>> 
> >>>> On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <lu...@gmail.com> wrote:
> >>>>> 
> >>>>> Hi,
> >>>>> 
> >>>>> I'm not sure if I understand, you just want implement JAX-RS as a
> >>>>> Struts 2 plugin ?
> >>>>> 
> >>>>> 
> >>>>> Regards
> >>>>> --
> >>>>> Łukasz
> >>>>> mobile +48 606 323 122 http://www.lenart.org.pl/
> >>>>> Warszawa JUG conference - Confitura http://confitura.pl/
> >>>>> 
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>>>> For additional commands, e-mail: user-help@struts.apache.org
> >>>>> 
> >>>> 
> >>> 
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>> 
> >> 
> >> �Т���������������������������������������������������������������������ХF�V�7V'67&�&R�R���âW6W"�V�7V'67&�&T7G'WG2�6�R��&pФf�"FF�F����6����G2�R���âW6W"ֆV�7G'WG2�6�R��&p
> > 		 	   		  
> 
> B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[�\�\�][��X��ܚX�P��]˘\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[�\�\�Z[��]˘\X�K�ܙ�B
 		 	   		  

Re: Spam: RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Joseph Mocker <jm...@velti.com>.
In our case it was with Tomcat.



On Aug 23, 2012, at 11:21 AM, Martin Gainty wrote:

> 
> JBoss or Tomcat?
> 
> Martin 
> ______________________________________________ 
> ..place longwinded disclaimer here...
> 
> 
>> From: jmocker@velti.com
>> To: user@struts.apache.org
>> Subject: Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
>> Date: Thu, 23 Aug 2012 18:06:24 +0000
>> 
>> �I agree, don't quite understand when you could use RESTeasy or Jersey in conjunction with Struts in the same web app.
>> 
>> I had written previously that we have a Jersey + Struts2 app running nicely.
>> 
>>  --joe
>> 
>> 
>> Joseph Mocker   |   Velti   |   Senior Software Architect
>> t +1.650.566.7033   m +1.408.676.6625
>> e jmocker@velti.com   @Mobclix
>> 
>> The leading global technology provider of
>> mobile marketing and advertising solutions
>> 
>> On Aug 22, 2012, at 10:53 PM, Lukasz Lenart wrote:
>> 
>>> But I think you can always use RESTeasy and get the same value without
>>> needs for custom plugin. I don't see a point to have another JAX-RS
>>> implementation on the market.
>>> 
>>> 
>>> Regards
>>> --
>>> Łukasz
>>> + 48 606 323 122 http://www.lenart.org.pl/
>>> 
>>> 
>>> 2012/8/21 Frans Thamura <fr...@meruvian.org>:
>>>> yes
>>>> 
>>>> righr now the syntax is @result and @action
>>>> 
>>>> i think if we have more like @get etc
>>>> 
>>>> that make it more powerfull
>>>> 
>>>> On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <lu...@gmail.com> wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> I'm not sure if I understand, you just want implement JAX-RS as a
>>>>> Struts 2 plugin ?
>>>>> 
>>>>> 
>>>>> Regards
>>>>> --
>>>>> Łukasz
>>>>> mobile +48 606 323 122 http://www.lenart.org.pl/
>>>>> Warszawa JUG conference - Confitura http://confitura.pl/
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>> 
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>> 
>> 
>> �Т���������������������������������������������������������������������ХF�V�7V'67&�&R�R���âW6W"�V�7V'67&�&T7G'WG2�6�R��&pФf�"FF�F����6����G2�R���âW6W"ֆV�7G'WG2�6�R��&p
> 		 	   		  


RE: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Martin Gainty <mg...@hotmail.com>.
JBoss or Tomcat?

Martin 
______________________________________________ 
..place longwinded disclaimer here...


> From: jmocker@velti.com
> To: user@struts.apache.org
> Subject: Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins
> Date: Thu, 23 Aug 2012 18:06:24 +0000
> 
> �I agree, don't quite understand when you could use RESTeasy or Jersey in conjunction with Struts in the same web app.
> 
> I had written previously that we have a Jersey + Struts2 app running nicely.
> 
>   --joe
> 
> 
> Joseph Mocker   |   Velti   |   Senior Software Architect
> t +1.650.566.7033   m +1.408.676.6625
> e jmocker@velti.com   @Mobclix
> 
> The leading global technology provider of
> mobile marketing and advertising solutions
> 
> On Aug 22, 2012, at 10:53 PM, Lukasz Lenart wrote:
> 
> > But I think you can always use RESTeasy and get the same value without
> > needs for custom plugin. I don't see a point to have another JAX-RS
> > implementation on the market.
> >
> >
> > Regards
> > --
> > Łukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> >
> > 2012/8/21 Frans Thamura <fr...@meruvian.org>:
> >> yes
> >>
> >> righr now the syntax is @result and @action
> >>
> >> i think if we have more like @get etc
> >>
> >> that make it more powerfull
> >>
> >> On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <lu...@gmail.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I'm not sure if I understand, you just want implement JAX-RS as a
> >>> Struts 2 plugin ?
> >>>
> >>>
> >>> Regards
> >>> --
> >>> Łukasz
> >>> mobile +48 606 323 122 http://www.lenart.org.pl/
> >>> Warszawa JUG conference - Confitura http://confitura.pl/
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> 
> �Т���������������������������������������������������������������������ХF�V�7V'67&�&R�R���âW6W"�V�7V'67&�&T7G'WG2�6�R��&pФf�"FF�F����6����G2�R���âW6W"ֆV�7G'WG2�6�R��&p
 		 	   		  

Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Joseph Mocker <jm...@velti.com>.
I agree, don't quite understand when you could use RESTeasy or Jersey in conjunction with Struts in the same web app.

I had written previously that we have a Jersey + Struts2 app running nicely.

  --joe


Joseph Mocker   |   Velti   |   Senior Software Architect
t +1.650.566.7033   m +1.408.676.6625
e jmocker@velti.com   @Mobclix

The leading global technology provider of
mobile marketing and advertising solutions

On Aug 22, 2012, at 10:53 PM, Lukasz Lenart wrote:

> But I think you can always use RESTeasy and get the same value without
> needs for custom plugin. I don't see a point to have another JAX-RS
> implementation on the market.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
>
> 2012/8/21 Frans Thamura <fr...@meruvian.org>:
>> yes
>>
>> righr now the syntax is @result and @action
>>
>> i think if we have more like @get etc
>>
>> that make it more powerfull
>>
>> On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <lu...@gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I'm not sure if I understand, you just want implement JAX-RS as a
>>> Struts 2 plugin ?
>>>
>>>
>>> Regards
>>> --
>>> Łukasz
>>> mobile +48 606 323 122 http://www.lenart.org.pl/
>>> Warszawa JUG conference - Confitura http://confitura.pl/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Lukasz Lenart <lu...@apache.org>.
But I think you can always use RESTeasy and get the same value without
needs for custom plugin. I don't see a point to have another JAX-RS
implementation on the market.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/


2012/8/21 Frans Thamura <fr...@meruvian.org>:
> yes
>
> righr now the syntax is @result and @action
>
> i think if we have more like @get etc
>
> that make it more powerfull
>
> On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <lu...@gmail.com> wrote:
>>
>> Hi,
>>
>> I'm not sure if I understand, you just want implement JAX-RS as a
>> Struts 2 plugin ?
>>
>>
>> Regards
>> --
>> Łukasz
>> mobile +48 606 323 122 http://www.lenart.org.pl/
>> Warszawa JUG conference - Confitura http://confitura.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Frans Thamura <fr...@meruvian.org>.
yes

righr now the syntax is @result and @action

i think if we have more like @get etc

that make it more powerfull
On Aug 22, 2012 3:01 AM, "Łukasz Lenart" <lu...@gmail.com> wrote:

> Hi,
>
> I'm not sure if I understand, you just want implement JAX-RS as a
> Struts 2 plugin ?
>
>
> Regards
> --
> Łukasz
> mobile +48 606 323 122 http://www.lenart.org.pl/
> Warszawa JUG conference - Confitura http://confitura.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Q: S2 REST vs JAXRS or S2-JAX-RS plugins

Posted by Łukasz Lenart <lu...@gmail.com>.
Hi,

I'm not sure if I understand, you just want implement JAX-RS as a
Struts 2 plugin ?


Regards
-- 
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org