You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by uday65 <ud...@yahoo.com> on 2007/10/15 15:03:19 UTC

T5 Not getting request values from jsp page.

Hi All,

I want to get one object from request of the jsp to my tapestry class.
I set object in jsp page as 
<%
	SpaceMainMenu spaceMainMenu = new SpaceMainMenu();
	request.setAttribute("spaceMainMenu",spaceMainMenu);
%>

Now i have to use this request attribute in tapestry5.
So in SpaceMainMenu Class, i tried to get it as ,
    --------
    --------
      private RequestGlobals requestGlobals;

	@BeginRender
	public void setvariable(){
	SpaceMainMenu d =
(SpaceMainMenu)requestGlobals.getHTTPServletRequest().getAttribute("SpaceMainMenu");
	System.out.println("The value  is "+d.getPersonalURL());
	
	}

But, Here I  getting the java.lang.NullPointerException, So If anybody know
How to handle request between Jsp and Tapestry 5.

I tried lot for it , And it is very necessory for me, plzz help,


Thanks In Advance,
Uday Mahajan.



-- 
View this message in context: http://www.nabble.com/T5-Not-getting-request-values-from-jsp-page.-tf4627243.html#a13212228
Sent from the Tapestry - Dev mailing list archive at Nabble.com.


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


Re: T5 Not getting request values from jsp page.

Posted by Howard Lewis Ship <hl...@gmail.com>.
This is a users question, not a developer question.

Try using the HttpSession; the request scope is limited to ONE request and
it is unlikely you are accomplishing that using a JSP + Tapestry combo.

On 10/15/07, uday65 <ud...@yahoo.com> wrote:
>
>
> Hi All,
>
> I want to get one object from request of the jsp to my tapestry class.
> I set object in jsp page as
> <%
>         SpaceMainMenu spaceMainMenu = new SpaceMainMenu();
>         request.setAttribute("spaceMainMenu",spaceMainMenu);
> %>
>
> Now i have to use this request attribute in tapestry5.
> So in SpaceMainMenu Class, i tried to get it as ,
>     --------
>     --------
>       private RequestGlobals requestGlobals;
>
>         @BeginRender
>         public void setvariable(){
>         SpaceMainMenu d =
>
> (SpaceMainMenu)requestGlobals.getHTTPServletRequest().getAttribute("SpaceMainMenu");
>         System.out.println("The value  is "+d.getPersonalURL());
>
>         }
>
> But, Here I  getting the java.lang.NullPointerException, So If anybody
> know
> How to handle request between Jsp and Tapestry 5.
>
> I tried lot for it , And it is very necessory for me, plzz help,
>
>
> Thanks In Advance,
> Uday Mahajan.
>
>
>
> --
> View this message in context:
> http://www.nabble.com/T5-Not-getting-request-values-from-jsp-page.-tf4627243.html#a13212228
> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind