You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ICE Ernesto Arteaga Zavala <ar...@gmail.com> on 2014/07/24 23:38:45 UTC

How to get Body Request

Hi guys,

 Quick question,  Is there a way to get the payload (body information) from
request interface on tapestry5?

 And where can I have a tutorial or API.

Thanks in advance!

Re: How to get Body Request

Posted by Lance Java <la...@googlemail.com>.
This is probably a good use case for  tapestry-resteasy and @Post. You
could make use of the jaxb marshalling.

http://tynamo.org/tapestry-resteasy+guide
On 24 Jul 2014 22:39, "ICE Ernesto Arteaga Zavala" <ar...@gmail.com>
wrote:

> Hi guys,
>
>  Quick question,  Is there a way to get the payload (body information) from
> request interface on tapestry5?
>
>  And where can I have a tutorial or API.
>
> Thanks in advance!
>

Re: How to get Body Request

Posted by Lance Java <la...@googlemail.com>.
I wonder if you could write a custom annotation? Not sure

Eg:
onActionFromSave(@RequestBody Foo saveMe) { ... }

Then you could auto coerce from json via the TypeCoercer. Just a thought,
not sure if it's possible.
 On 25 Jul 2014 15:10, "ICE Ernesto Arteaga Zavala" <ar...@gmail.com>
wrote:

> 2014-07-25 8:52 GMT-05:00 Thiago H de Paula Figueiredo <thiagohp@gmail.com
> >:
>
> > On Fri, 25 Jul 2014 10:33:08 -0300, ICE Ernesto Arteaga Zavala <
> > arterzatij@gmail.com> wrote:
> >
> >        5. *Request Payload*view source
> >>                    *  <= This is the pay load (request body)*
> >>
> >>    {id:0, title:Another Event, allDay:false}
> >>
> >
> > Ok, now it makes sense. :) Yeah, HttpServletRequest.getReader() is the
> way
> > to go.
> >
> >
> >  I'm using my tapestry page as controller with this I have single page
> >> module (module like users, events, tasks, reports, etc) application, so
> >> each module I load to patestry is a single page with ajax request
> >> interaction.
> >>
> >> Instead of have: http://localhost:8080/events/index
> >> http://localhost:8080/events/edit
> >> http://localhost:8080/events/edit.save
> >> http://localhost:8080/events/delete.save
> >>
> >> etc...
> >>
> >> I have:
> >>
> >> http://localhost:8080/events/index.all //Return all information
> >> http://localhost:8080/events/index.filter // to filter the DB
> >>  http://localhost:8080/events/index.save // to post a new event
> >>  http://localhost:8080/events/index.patch // to update
> >>  http://localhost:8080/events/index.destroy // to delete
> >> http://localhost:8080/events/index.get // to have one event
> >>
> >
> > In the Index page for events, if you create onAll(), onFilter(),
> onSave(),
> > onPatch(), onDestroy() and onGet() event handler methods, you don't even
> > need to pass the event links. It should just work.
>
>
> Yes, this is the way I have implemented.
>
>
>
> public class Index
> {
>
>  @Inject
>  private RequestPayloadReader rPayload;
>  ...
>
>   /** resource /events/index.save <http://localhost:8080/events/index.save
> >
>  */
>   void onActionFromSave(){
>
>     Event newEvent = rPayload.read(Event.class);
>
>     // service call to store new event and more code...
>   }
>
>  ...
> }
>
> >
> >
> >  all information goes over the URL parameters for filter or get, but to
> >> post, patch or destroy all params goes over json
> >> So, instead of have a controller to multiple pages I have a page like
> >> controller for multiple requests.
> >>
> >
> > Sounds good to me. :)
> >
> >
> >  In the server side to manage json information, now I'm using what you
> >> suggest Thiago to read the body (payload) and to unmarshal that json I'm
> >> using gson library from google, after I have my DTO (entity) to store at
> >> DB.
> >>
> >
> > So I guess almost everything is working now, right? :)
>
>
> Yes, thanks!
>
>
> >
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Tapestry, Java and Hibernate consultant and developer
> > http://machina.com.br
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Saludos,
>
> -------------------------------------------------------------------
> "Nada que se consiga sin pena y sin trabajo
>  es verdaderamente valioso."
>                                           Joseph Addison
> -------------------------------------------------------------------
>
> ICE Ernesto Arteaga Zavala
> Ingeniero de Desarrollo
>

Re: How to get Body Request

Posted by ICE Ernesto Arteaga Zavala <ar...@gmail.com>.
2014-07-25 8:52 GMT-05:00 Thiago H de Paula Figueiredo <th...@gmail.com>:

> On Fri, 25 Jul 2014 10:33:08 -0300, ICE Ernesto Arteaga Zavala <
> arterzatij@gmail.com> wrote:
>
>        5. *Request Payload*view source
>>                    *  <= This is the pay load (request body)*
>>
>>    {id:0, title:Another Event, allDay:false}
>>
>
> Ok, now it makes sense. :) Yeah, HttpServletRequest.getReader() is the way
> to go.
>
>
>  I'm using my tapestry page as controller with this I have single page
>> module (module like users, events, tasks, reports, etc) application, so
>> each module I load to patestry is a single page with ajax request
>> interaction.
>>
>> Instead of have: http://localhost:8080/events/index
>> http://localhost:8080/events/edit
>> http://localhost:8080/events/edit.save
>> http://localhost:8080/events/delete.save
>>
>> etc...
>>
>> I have:
>>
>> http://localhost:8080/events/index.all //Return all information
>> http://localhost:8080/events/index.filter // to filter the DB
>>  http://localhost:8080/events/index.save // to post a new event
>>  http://localhost:8080/events/index.patch // to update
>>  http://localhost:8080/events/index.destroy // to delete
>> http://localhost:8080/events/index.get // to have one event
>>
>
> In the Index page for events, if you create onAll(), onFilter(), onSave(),
> onPatch(), onDestroy() and onGet() event handler methods, you don't even
> need to pass the event links. It should just work.


Yes, this is the way I have implemented.



public class Index
{

 @Inject
 private RequestPayloadReader rPayload;
 ...

  /** resource /events/index.save <http://localhost:8080/events/index.save>
 */
  void onActionFromSave(){

    Event newEvent = rPayload.read(Event.class);

    // service call to store new event and more code...
  }

 ...
}

>
>
>  all information goes over the URL parameters for filter or get, but to
>> post, patch or destroy all params goes over json
>> So, instead of have a controller to multiple pages I have a page like
>> controller for multiple requests.
>>
>
> Sounds good to me. :)
>
>
>  In the server side to manage json information, now I'm using what you
>> suggest Thiago to read the body (payload) and to unmarshal that json I'm
>> using gson library from google, after I have my DTO (entity) to store at
>> DB.
>>
>
> So I guess almost everything is working now, right? :)


Yes, thanks!


>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Saludos,

-------------------------------------------------------------------
"Nada que se consiga sin pena y sin trabajo
 es verdaderamente valioso."
                                          Joseph Addison
-------------------------------------------------------------------

ICE Ernesto Arteaga Zavala
Ingeniero de Desarrollo

Re: How to get Body Request

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 25 Jul 2014 10:33:08 -0300, ICE Ernesto Arteaga Zavala  
<ar...@gmail.com> wrote:

>       5. *Request Payload*view source
>                    *  <= This is the pay load (request body)*
>    {id:0, title:Another Event, allDay:false}

Ok, now it makes sense. :) Yeah, HttpServletRequest.getReader() is the way  
to go.

> I'm using my tapestry page as controller with this I have single page
> module (module like users, events, tasks, reports, etc) application, so
> each module I load to patestry is a single page with ajax request
> interaction.
>
> Instead of have: http://localhost:8080/events/index
> http://localhost:8080/events/edit
> http://localhost:8080/events/edit.save
> http://localhost:8080/events/delete.save
>
> etc...
>
> I have:
>
> http://localhost:8080/events/index.all //Return all information
> http://localhost:8080/events/index.filter // to filter the DB
>  http://localhost:8080/events/index.save // to post a new event
>  http://localhost:8080/events/index.patch // to update
>  http://localhost:8080/events/index.destroy // to delete
> http://localhost:8080/events/index.get // to have one event

In the Index page for events, if you create onAll(), onFilter(), onSave(),  
onPatch(), onDestroy() and onGet() event handler methods, you don't even  
need to pass the event links. It should just work.

> all information goes over the URL parameters for filter or get, but to
> post, patch or destroy all params goes over json
> So, instead of have a controller to multiple pages I have a page like
> controller for multiple requests.

Sounds good to me. :)

> In the server side to manage json information, now I'm using what you
> suggest Thiago to read the body (payload) and to unmarshal that json I'm
> using gson library from google, after I have my DTO (entity) to store at  
> DB.

So I guess almost everything is working now, right? :)

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to get Body Request

Posted by ICE Ernesto Arteaga Zavala <ar...@gmail.com>.
2014-07-25 6:53 GMT-05:00 Thiago H de Paula Figueiredo <th...@gmail.com>:

> On Fri, 25 Jul 2014 00:51:34 -0300, ICE Ernesto Arteaga Zavala <
> arterzatij@gmail.com> wrote:
>
>  Yep I know that and that's why I started asking for a particular way to
>> do something, how to get my data from payload?, all the rest is on my own.
>>
>
> What do you mean by payload? In web applications, data is usually sent to
> servers using query parameters. Could you please provide an example of
> payload?


This is my request to the server I'm sending/receiving information on JSON
format:


   1. Request URL:
   http://localhost:8080/events/index.save
   2. Request Method:
   POST
   3. Status Code:
   200 OK
   4. Request Headersview source
      1. Accept:
      application/json, text/javascript, */*; q=0.01
      2. Accept-Encoding:
      gzip,deflate,sdch
      3. Accept-Language:
      es-419,es;q=0.8
      4. Connection:
      keep-alive
      5. Content-Length:
      47
      6. Content-Type:
      application/json; charset=UTF-8
      7. Cookie:
      JSESSIONID=1dq4ia9iluyun
      8. Host:
      localhost:8080
      9. Origin:
      http://localhost:8080
      10. Referer:
      http://localhost:8080/newapp/
      11. User-Agent:
      Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like
      Gecko) Chrome/35.0.1916.153 Safari/537.36
      12. X-Requested-With:
      XMLHttpRequest
      5. *Request Payload*view source
                   *  <= This is the pay load (request body)*
   {id:0, title:Another Event, allDay:false}
   1. allDay: false
      2. id: 0
      3. title: "Another Event"
   6. Response Headersview source
      1. Content-Type:
      application/json;charset=UTF-8
      2. Server:
      Jetty(6.1.16)
      3. Transfer-Encoding:
      chunked


>
>  Actually body request was the last part of the puzzle.
>> I have done the connexion between backbone and tapestry to make dynamic
>> html generation.
>>
>
> If you're using Tapestry 5.4, check the PartialTemplateRenderer. It'll
> make your life easier.


I'll take a read about it.

>
>
>  But is good your interest on what I'm doing.
>>
>
> I'm sorry, I'm not following you.


I'll try to explain:

I'm using my tapestry page as controller with this I have single page
module (module like users, events, tasks, reports, etc) application, so
each module I load to patestry is a single page with ajax request
interaction.

Instead of have: http://localhost:8080/events/index
http://localhost:8080/events/edit
http://localhost:8080/events/edit.save
http://localhost:8080/events/delete.save

etc...

I have:

http://localhost:8080/events/index.all //Return all information
http://localhost:8080/events/index.filter // to filter the DB
 http://localhost:8080/events/index.save // to post a new event
 http://localhost:8080/events/index.patch // to update
 http://localhost:8080/events/index.destroy // to delete
http://localhost:8080/events/index.get // to have one event

all information goes over the URL parameters for filter or get, but to
post, patch or destroy all params goes over json
So, instead of have a controller to multiple pages I have a page like
controller for multiple requests.

Using tml I'm generating templates for Javascript template engines. And so
I delegate to backbone to interact with the server and manage the different
views.
The template are manipulated from server, if there is something that a
non-privilege user will see. Tapestry remove the field o block from tml
using security rules.

In the server side to manage json information, now I'm using what you
suggest Thiago to read the body (payload) and to unmarshal that json I'm
using gson library from google, after I have my DTO (entity) to store at DB.

>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Saludos,

-------------------------------------------------------------------
"Nada que se consiga sin pena y sin trabajo
 es verdaderamente valioso."
                                          Joseph Addison
-------------------------------------------------------------------

ICE Ernesto Arteaga Zavala
Ingeniero de Desarrollo

Re: How to get Body Request

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 25 Jul 2014 00:51:34 -0300, ICE Ernesto Arteaga Zavala  
<ar...@gmail.com> wrote:

> Yep I know that and that's why I started asking for a particular way to  
> do something, how to get my data from payload?, all the rest is on my  
> own.

What do you mean by payload? In web applications, data is usually sent to  
servers using query parameters. Could you please provide an example of  
payload?

> Actually body request was the last part of the puzzle.
> I have done the connexion between backbone and tapestry to make dynamic
> html generation.

If you're using Tapestry 5.4, check the PartialTemplateRenderer. It'll  
make your life easier.

> But is good your interest on what I'm doing.

I'm sorry, I'm not following you.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to get Body Request

Posted by ICE Ernesto Arteaga Zavala <ar...@gmail.com>.
2014-07-24 21:22 GMT-05:00 Thiago H de Paula Figueiredo <th...@gmail.com>
:

> On Thu, 24 Jul 2014 20:12:43 -0300, ICE Ernesto Arteaga Zavala <
> arterzatij@gmail.com> wrote:
>
>  2014-07-24 17:33 GMT-05:00 Thiago H de Paula Figueiredo <
>> thiagohp@gmail.com>
>> :
>>
>>  On Thu, 24 Jul 2014 19:31:35 -0300, Thiago H de Paula Figueiredo <
>>> thiagohp@gmail.com> wrote:
>>>
>>>  On Thu, 24 Jul 2014 19:04:09 -0300, ICE Ernesto Arteaga Zavala <
>>>
>>>> arterzatij@gmail.com> wrote:
>>>>
>>>>  Why do you need that?
>>>>
>>>>>
>>>>>>  I'll integrate some backbone.js capabilieties, but zones are not the
>>>>>>
>>>>> better match to do it.
>>>>>
>>>>>
>>>> What exactly? Couldn't you just use query parameters instead of getting
>>>> the whole post information and parse it later?
>>>>
>>>>
>>> Even if you're not going to use zones, you can still use Tapestry events
>>> and pages and return JSONObject or JSONArray to feed your JavaScript.
>>>
>>
>>
>> How can I achieve that using the follow javascript:
>>
>
> First you need to create an URL to pass to your JavaScript code. For
> events:
>
> @Inject
> private ComponentResources resources;
> ...
> String eventUrl = resources.createEventLink("someEventName").toString();
>
> Then pass it to your JavaScript code using JavaScriptSupport: script()
> (easier), addInitializerCall() or require() (5.4+ only).
>
> Then you can handle the event:
>
> @OnEvent("someEventName")
> Object handleYourEvent() {
>         ...
>         return something; // in your case, it'll probably a JSONObject or
> JSONArray.
>
> }
>
>  Events = Backbone.Collection.extend({
>>
>>   model: Models.Event,
>>   name: 'events',
>>   url : '/events/index.all',
>>
>>   filter : JSON.Stringify(data),
>>
>>   });
>>
>
> I don't know Backbone, as probably most people in this mailing list, so
> you're better off asking how to do x, not how to take some code in Backbone
> and adapt it to Tapestry.


Yep I know that and that's why I started asking for a particular way to do
something, how to get my data from payload?, all the rest is on my own.

Actually body request was the last part of the puzzle.
I have done the connexion between backbone and tapestry to make dynamic
html generation.

But is good your interest on what I'm doing.

Thanks for you time and your assistance.

>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Saludos,

-------------------------------------------------------------------
"Nada que se consiga sin pena y sin trabajo
 es verdaderamente valioso."
                                          Joseph Addison
-------------------------------------------------------------------

ICE Ernesto Arteaga Zavala
Ingeniero de Desarrollo

Re: How to get Body Request

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 24 Jul 2014 20:12:43 -0300, ICE Ernesto Arteaga Zavala  
<ar...@gmail.com> wrote:

> 2014-07-24 17:33 GMT-05:00 Thiago H de Paula Figueiredo  
> <th...@gmail.com>
> :
>
>> On Thu, 24 Jul 2014 19:31:35 -0300, Thiago H de Paula Figueiredo <
>> thiagohp@gmail.com> wrote:
>>
>>  On Thu, 24 Jul 2014 19:04:09 -0300, ICE Ernesto Arteaga Zavala <
>>> arterzatij@gmail.com> wrote:
>>>
>>>  Why do you need that?
>>>>>
>>>>>  I'll integrate some backbone.js capabilieties, but zones are not the
>>>> better match to do it.
>>>>
>>>
>>> What exactly? Couldn't you just use query parameters instead of getting
>>> the whole post information and parse it later?
>>>
>>
>> Even if you're not going to use zones, you can still use Tapestry events
>> and pages and return JSONObject or JSONArray to feed your JavaScript.
>
>
> How can I achieve that using the follow javascript:

First you need to create an URL to pass to your JavaScript code. For  
events:

@Inject
private ComponentResources resources;
...
String eventUrl = resources.createEventLink("someEventName").toString();

Then pass it to your JavaScript code using JavaScriptSupport: script()  
(easier), addInitializerCall() or require() (5.4+ only).

Then you can handle the event:

@OnEvent("someEventName")
Object handleYourEvent() {
	...
	return something; // in your case, it'll probably a JSONObject or  
JSONArray.
}

> Events = Backbone.Collection.extend({
>
>   model: Models.Event,
>   name: 'events',
>   url : '/events/index.all',
>
>   filter : JSON.Stringify(data),
>
>   });

I don't know Backbone, as probably most people in this mailing list, so  
you're better off asking how to do x, not how to take some code in  
Backbone and adapt it to Tapestry.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to get Body Request

Posted by ICE Ernesto Arteaga Zavala <ar...@gmail.com>.
2014-07-24 17:33 GMT-05:00 Thiago H de Paula Figueiredo <th...@gmail.com>
:

> On Thu, 24 Jul 2014 19:31:35 -0300, Thiago H de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
>
>  On Thu, 24 Jul 2014 19:04:09 -0300, ICE Ernesto Arteaga Zavala <
>> arterzatij@gmail.com> wrote:
>>
>>  Why do you need that?
>>>>
>>>>  I'll integrate some backbone.js capabilieties, but zones are not the
>>> better match to do it.
>>>
>>
>> What exactly? Couldn't you just use query parameters instead of getting
>> the whole post information and parse it later?
>>
>
> Even if you're not going to use zones, you can still use Tapestry events
> and pages and return JSONObject or JSONArray to feed your JavaScript.


How can I achieve that using the follow javascript:

Events = Backbone.Collection.extend({

  model: Models.Event,
  name: 'events',
  url : '/events/index.all',

  filter : JSON.Stringify(data),

  });



>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Saludos,

-------------------------------------------------------------------
"Nada que se consiga sin pena y sin trabajo
 es verdaderamente valioso."
                                          Joseph Addison
-------------------------------------------------------------------

ICE Ernesto Arteaga Zavala
Ingeniero de Desarrollo

Re: How to get Body Request

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 24 Jul 2014 19:31:35 -0300, Thiago H de Paula Figueiredo  
<th...@gmail.com> wrote:

> On Thu, 24 Jul 2014 19:04:09 -0300, ICE Ernesto Arteaga Zavala  
> <ar...@gmail.com> wrote:
>
>>> Why do you need that?
>>>
>> I'll integrate some backbone.js capabilieties, but zones are not the  
>> better match to do it.
>
> What exactly? Couldn't you just use query parameters instead of getting  
> the whole post information and parse it later?

Even if you're not going to use zones, you can still use Tapestry events  
and pages and return JSONObject or JSONArray to feed your JavaScript.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to get Body Request

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 24 Jul 2014 19:04:09 -0300, ICE Ernesto Arteaga Zavala  
<ar...@gmail.com> wrote:

>> Why do you need that?
>>
> I'll integrate some backbone.js capabilieties, but zones are not the  
> better match to do it.

What exactly? Couldn't you just use query parameters instead of getting  
the whole post information and parse it later?

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to get Body Request

Posted by ICE Ernesto Arteaga Zavala <ar...@gmail.com>.
2014-07-24 16:47 GMT-05:00 Thiago H de Paula Figueiredo <th...@gmail.com>
:

> On Thu, 24 Jul 2014 18:38:45 -0300, ICE Ernesto Arteaga Zavala <
> arterzatij@gmail.com> wrote:
>
>  Hi guys,
>>
>
> Hi!
>
>   Quick question,  Is there a way to get the payload (body information)
>> from request interface on tapestry5?
>>
>
> You can't, as Request doesn't provide that feature. But you can @Inject
> HttpServletRequest and use its getInputStream() or getReader() methods.
>

OK, perfect!


>
> Why do you need that?
>
>
I'll integrate some backbone.js capabilieties, but zones are not the better
match to do it.



> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Saludos,

-------------------------------------------------------------------
"Nada que se consiga sin pena y sin trabajo
 es verdaderamente valioso."
                                          Joseph Addison
-------------------------------------------------------------------

ICE Ernesto Arteaga Zavala
Ingeniero de Desarrollo

Re: How to get Body Request

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 24 Jul 2014 18:38:45 -0300, ICE Ernesto Arteaga Zavala  
<ar...@gmail.com> wrote:

> Hi guys,

Hi!

>  Quick question,  Is there a way to get the payload (body information)  
> from request interface on tapestry5?

You can't, as Request doesn't provide that feature. But you can @Inject  
HttpServletRequest and use its getInputStream() or getReader() methods.

Why do you need that?

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org