This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Hi Friends, I am trying to forward a bean object from my JSP page to my Action class. I am using this statement for this purpose <bean efine id="nextpage" name="pagewise" scope="request" toScope="request" type="PagewiseBrowseForm " /> In my action class PagewiseBrowseForm pageForm=(PagewiseBrowseForm)request.getAttribute("nextpage"); But value of pageForm is null. Any help is always gratefully received. Thanks in adv. Sonu
request-scope attributes exist only while a request is being processed on the server side. In the JSP, the attributes are available only while the page is being rendered. Once the page gets rendered and the response goes out to the client, the attributes disappear (since your request has gone out of scope, it's attributes go out of scope as well). You might want to keep your attribute in the session scope instead although I'm not sure I understand why you want to play around with a Form bean since the Struts framework already manages them in the session scope anyway. Besides, the form is always passed to your Actions execute()/perform() method so there's hardly ever any reason to do what it looks like you're trying to do.
I was trying to do show resultset page wise. For this I have a bean where I kept resultset info like total records,last records seen etc .When I put this object in session bean I was running into problem.So I was trying to keep that in request scope. Now I have kept constant infos like resultset size in session and some info like last record fetched as request parameter. Does anybody have any better idea for pagination in struts as I don't want to bring complete resultset in one trip. Sonu