Re: JSP object naming problem
Monday, February 4, 2002 08:02 AM
there is no technical reason why this should not be done this way. the only issue that is possible here is that AAAServiceDetail.someMethod() call is confusing to read because your class and object are named the same and it is confusing whether this is a call to a static method in AAAServiceDetail class or a call to a method on the object AAAServiceDetails. but the JVM will have no problem resolving this. since you cannot have a static method on a regular method with the same name and the same signature, JVM can figure out what you are trying to do and will execute correctly invoking a static method when you mean AAAServiceDetail as a class and regular method when you use AAAServiceDetail as an object. However, this is a horrible code and you should rename id in the jsp:useBean to something else like aaaServiceDetail.