Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

tag and method overloading

Ronald Klop

2003-06-03

Replies:

Hello,

Is it possible to overload a method of a tag.

In JSP:
String arg1 = "bla";
int arg2 = 5;
<mytag name="<%= arg1 %>" />
<mytag name="<%= arg2 %>" />

In the class:
public void setName(String s) {
...
}
public void setName(int i) {
...
}

I get errors like: can't find setter method for String.

Is this supported? If yes, are their known pitfalls?
Any pointers to docs about this? Already tried google, but didn't find
anything relevant.

Greetings,

Ronald.




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.