• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting an exception while trying to check the radio button

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Dee Gee
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

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
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 html:option 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic