Getting an exception while trying to check the radio button
Dee Gee
Greenhorn
Joined: May 10, 2006
Posts: 10
posted
0
Hi
I am getting an exception while trying to check the radio button. The exception is:-
org.apache.jasper.JasperException: /request.jsp(39,4) Attribute checked invalid for tag radio according to TLD
Is the exception and the code is---------------------------- html:radio value="Event is not recurring" property="recurring" checked="checked" ----------------------------------------------------------------
Please help me out.
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
posted
0
If you look at The documentation for the html:radio tag you'll see that there is no checked property for this tag. If you want the button to show as checked when the JSP is displayed, set the property "recurring" of your form bean to "event is not recurring" before displaying the JSP. That's how all <html:xxx> tags work: They take their value from the ActionForm property.
This didn't work.----------------------- In form bean: String recurring = "Event is not recurring"; ------------------------------ In JSP: html:radio value="Event is not recurring" property="recurring" --------------------------------------------------- One more thing how do you have html:checkbox selected. And how can you put one of the html ption of html:select as the selected option?
Thank You DG
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
posted
0
When you say "didn't work", what do you mean?
I just tried this in a test page and it works great for me.
Here's the code:
testForm
And how can you put one of the htmlption of html:select as the selected option?
<html:select> works exactly the same way. If you populate the property of the form bean specified in the <html:select> tag with the value of the option you want selected, that option will show as selected when the page is displayed.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Getting an exception while trying to check the radio button