I try to use org.apache.tapestry5.services.Request.setAttribute() in Login.java Page
public class Login { @Inject private Request request; .... Object onSubmitFromLogin(){ ... request.setAttribute( org.jecommerce.services.AccessController.USER, new User(...) ); ... } } and retrieve it back in AccessController.java public boolean dispatch(Request request, Response response) throws IOException{ ... User user = (User)request.getAttribute(USER); ... } However, it fails because it seems like the Request object in these two classes are different. One is proxy, the other is the its impl. The output shows - Request in Login.java: <Proxy for Request(org.apache.tapestry5.services.Request)> - Request in AccessController.java: org.apache.tapestry5.internal.services.requesti...@1c5cd7 What way is the correct method to set data in the Request object in Page and retrieve it back from dispatch function? Thanks in advice, Thiago H. de Paula Figueiredo wrote: > > Em Fri, 05 Jun 2009 17:36:39 -0300, Neo Anderson > <javadeveloper...@yahoo.co.uk> escreveu: > >> I following the mailing list at >> http://markmail.org/message/t5sopnse2wgqms7u#query:accessing%20requestglobals%20inside%20dispatcher%20and%20other%20data%20support%20classes+page:1+mid:ks77ayww62mra7in+state:results, >> >> trying to obtain data from RequestGlobals. > > That's an old thread . . . > Try using just Request and its getAttribute() and setAttribute() methods, > not using RequestGlobals. > > -- > Thiago H. de Paula Figueiredo > Independent Java consultant, developer, and instructor > http://www.arsmachina.com.br/thiago > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://n2.nabble.com/Obtain-the-data-inside-RequestGlobals-question-tp3032702p3045819.html Sent from the Tapestry Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org