Two Laptop Bag*
The moose likes Other Application Frameworks and the fly likes Stripes | JSTL: Can't access bean variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Stripes | JSTL: Can Watch "Stripes | JSTL: Can New topic
Author

Stripes | JSTL: Can't access bean variable

Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
We are using Stripes framework with JSTL in front end. Now there is a class which is mapped as



eventually i want to access the packageManager list on the jobPayment.jsp page. but i am not able to do it. I don't know the reason. I am trying to digg into stripes framework but the deadline is short. my ulitame goal is to

show the list of packages in radio form and then submit the selected package to the particular class. Can someone please help me here?

here is the jsp file



The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

The problem is that you are doing a RedirectResolution in your DefaultHandler method which means this particular action bean will no longer be available in the request. You need to use a ForwardResolution and then you can access your packages via ${actionBean.packages}.


GenRocket - Experts at Building Test Data
Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
Gregg Bolinger wrote:The problem is that you are doing a RedirectResolution in your DefaultHandler method which means this particular action bean will no longer be available in the request. You need to use a ForwardResolution and then you can access your packages via ${actionBean.packages}.

thanks - that really helped. but now some weird thing is taking time.

I have did the "ForwardResolution" from actionclass one to .. "jobPayment.jsp". Where the packages are being rendered properly (thanks to you)

and I have added following for there

This thing is being rendered accordingly. but when i click on save button, it does not go to the Action class. i.e i can't have control back to the java class for further processing

the java class is same like i posted earlier with this added method
[code]
public Resolution save() {
System.out.println("----------");
System.out.println(selectedPackage);
System.out.println(packageName);
return new RedirectResolution("/login.jsp");
}
Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
I guess I am having problem in using <stripes:radio> ... :s since wthout radio i am able to get the input fields ..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Stripes | JSTL: Can't access bean variable
 
Similar Threads
Dropdown list
How to pass request Attribute to Action in Struts 2
Frameworks? Do I need one? want one?
please help me with this app - URGENT !
Stripes and session timeout