"Girish T Deshpande" <> wrote in message
news: m...
> Hi,
>
> I have 350 options <html:select>, but the WebLogic 7.2 is complaining
> about it and unablue to compile. I commented about 50 options and its
> displaying them successfully. Is there any limit for the number of
> options.
> I must have 350 options in <html:select>
There's no limit on the number of options per se, and it has nothing to do
with Struts really. It is because the class file that is generated from the
jsp is too big (believe it or not there is a limit, which I think is
JVM-specific), or a method in the class is too big.
I'd probably do this:
<html:select property="<%=propertyName%>" >
<html

ptions collection="countries" property="countryCode"
labelProperty="countryName"/>
</html:select>
where countries is a collection of beans representing a country (with
properties countryCode and countryName). Generate the list in the Action and
put it on the request. If the same list is going to be used in multiple
places, I'd consider making it a singleton/static list.
Another possible solution is to split the file and jsp:include the second
half into the first. But in your case I don't think it will help since just
the html:select block itself is probably big enough to cause a compilation
error.