7. A developer wants to use EL to invoke a function using ${my:bloof("foof")}.
Which is always true?
A. The method invoked by this function must be static.
B. The function class must implement the Function interface.
C. The expression is NOT a valid EL expression for invoking a function.
D. The function must be declared in a web.xml file using the <function> element.
E. The function class must have a method with the signature : void bloof(java.lang.String s)
위의 문제는 EL 함수에 대해 올바른 내용이 무엇인지 고르는 문제이다.
EL 함수를 사용 하려면 몇가지 작업이 필요합니다.
- 함수를 정의한 클래스 제작합니다. ( 함수가 될 메소드는 반드시 public 과 static 이어야만 한다.)
- 태그 라이브러리 서술자 파일을 만들어야 한다. (일명 TLD 파일)
- JSP에 taglib 지시자를 코딩해야 한다. (<%@ taglib prefix = "my" uri = " yayongi" %>)
- 함수를 호출하는 EL 작성 ( ${my:bloof("foof")} )
이 글은 스프링노트에서 작성되었습니다.