The mutator is not being set. I did some experiments. I can:
a. Set a jsp:setProperty directly in the jsp at the place where I previously used the tag (right after the jsp:useBean)
b. Set the jsp:setProperty directly in the tag (ie, not using el in the param, just setting the param directly)
c. Inside the .tag file, I can output the value that I pass into the prefix attribute
However, when I try to set information in the jsp:setProperty's param attribute in the .tag file, and that information I want to set comes from the .tag file's attribute, it doesn't work. Does this mean you can't set the attributes of markup inside tags using expression language?
[ September 21, 2006: Message edited by: Jacob Fenwick ] [ September 21, 2006: Message edited by: Jacob Fenwick ]
Then the problem is clearly not in the EL but in the setProperty.
That's where you'll need to dig.
By the way, why are you using setProperty rather than <c:set>? I haven't used setProperty in years.
Joined: Apr 28, 2006
I realized that the jsp:setProperty is being called first, then the EL is being evaluated. I confirmed this by calling tagtest.jsp this way:
This produced the correct html output.
I'm trying to rewrite the jsp:setProperty to use a c:set but I'm a little stuck. This is what I have:
I need to find a way to concatenate the prefix attribute and some string together, and append that to the param. . I don't think there's a way to do that, so I'll probably have to abandon doing this in a .tag file.
I see this as a weakness of c:set. If I had stuck to scriptlets and jsp:setProperty I would have had more control (or maybe not, maybe the jsp:setProperty is called even before the scriptlets).
I need to find a way to concatenate the prefix attribute and some string together,
Joined: Apr 28, 2006
That won't work. What I'm trying to do is something like this:
I know that won't work but that's approximately what I want to do. I want to fill the value of the c:set with the request parameter called prefix+table. So if I pass foo into the prefix attribute of that .tag file then the request parameter will be footable.