You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Swaminathan Gurumoorthy <sw...@yahoo.com> on 2003/11/03 23:49:45 UTC

Runtime Evaluation Order of struts tags and jsp expressions

Hi 
 
I have a problem with the way I thought struts tags and jsp expressions are evaluated.
 
I have a sample code like this:
 

<% int tabIndexCtr = 1; %> 

<html:text property="customerNumber" tabindex="<%= tabIndexCtr++ %>" size="18" maxlength="10" value="" styleClass="textboxfont"/>

I am trying to design my jsp's to have dynamic tab indexes so that I don't have to hard code them.

But I get an error like this:

    [javac] inquireOrderBody_jsp.java:191: setTabindex(java.lang.String) in org.apache.struts.taglib.html.BaseHandlerTag cannot be applied to (int)
    [javac]           _jspx_th_html_text_0.setTabindex( tabIndexCtr++ );

 

Isn't the jsp expression evaluated before the custom tag evaluation? Whay am I getting this error? How do I fix this?

Thanks for the help in advance.



---------------------------------
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears