Frank Bueckert

+ Follow
since Mar 23, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Frank Bueckert

If I'm understanding you correctly, you have multiple checkboxes named the same. Problem with that is that Struts will probably (correct me if I'm wrong; I'm no expert) take the last one, and set the ActionForm value to that. You need to give them different names in the JSP.

The actionForm also requires a variable for each checkbox; ie: you have three checkboxes, named checkbox1, checkbox2, and checkbox3. The actionForm then requires boolean checkbox1, boolean checkbox2, and boolean checkbox3.

Don't forget to set these to false in your reset method, since HTML has a quirky way of sending checkbox values. If it's not checked, nothing is sent for that checkbox. If it IS checked, you get data. So, the default way of handling them is to assume they're false.
15 years ago
Not exactly sure how to go about this. I'm using the JFreeChart jar file to generate a dynamic image based on the data I'm using. That's all fine and dandy.
My problem is accessing a variable I'm defining in the action, and using it in a scriptlet to write an imagemap straight into the JSP.

This defines the variable for the JSP. That part works fine. However, when I try to use it in a scriptlet, it turns up as null.

I've tried using "info", "(org.jfree.chart.ChartRenderingInfo) info", and any other variations I can come up with. I know I'm doing something wrong, but I have no idea what.
15 years ago
Perfect! Worked like a charm!

Thanks for your help.
15 years ago
I'm having a slight problem with one of my filters. Basically, it holds a servletcontext variable, where it stores some values on startup. This is done to speed up the program, so that it's not constantly reading the same values in per person, or per request.

So, that means the values are static until Tomcat's restarted. My question is, is there any way to access that servletcontext variable? I'm trying to add in a way to force a re-load of values, so that we don't need to restart Tomcat all the time.

Thanks for the help!
15 years ago
form beans can be either request or session scope.

In your controller class, do your calculations, and then put
for request objects
for session objects.

Then, in your JSP, you put

Just make sure you have scope set to the instance you want, and you'll have access to it. Just point all struts name parameters at the bean:define id parm, and you can yank whatever you want out of it.

There's probably an easier way to do this, but that's how I do it.
[ March 24, 2006: Message edited by: Frank Bueckert ]
16 years ago
Ok. So according to your code and your explanation, CalificacionForm is structured as follows:

Am I right with that? Seems kinda off from what you've been describing. Can you post the java file that is handling the submit, please? I suspect it's attempting to access an empty ArrayList.
16 years ago
Can you post your form-bean class and maybe your .jsp, please? It might be you're attempting to pass too much, or not enough. Or maybe nothing.
16 years ago
I've been bashing my head against this for most of the day. I think I've narrowed the problem down to a single line, but I have absolutely no idea on how to fix it. Documentation has a little bit of help, but not what I'm looking for.

Problem: Implementing security roles yanked out of a database. Specific to users. If I set permissions="rolesAdapter" in the useMenuDisplayer tag, nobody gets anything. I set permissions=<custom permission adapter> and everyone gets everything. Obviously, something wrong is happening.
Checking my roles, they get added to the user class properly.


This is basically yanked straight out of the permissions example. My problem is that menus turns up as null, no matter what I attempt to do. Why?

So, that is my problem. What am I doing wrong?
16 years ago