ERROR:Invalid syntax for function signature in TLD

7173 단어
잘못된 로그
 : Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Invalid syntax for function signature in TLD.  Tag Library:  , Function: xxxx
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:445)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:165)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.getMethod(Validator.java:1643)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.processSignature(Validator.java:1630)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.access$400(Validator.java:418)
	at org.apache.jasper.compiler.Validator$ValidateVisitor$1FVVisitor.visit(Validator.java:1606)
	at org.apache.jasper.compiler.ELNode$Function.accept(ELNode.java:139)
	at org.apache.jasper.compiler.ELNode$Nodes.visit(ELNode.java:214)
	at org.apache.jasper.compiler.ELNode$Visitor.visit(ELNode.java:256)
	at org.apache.jasper.compiler.ELNode$Root.accept(ELNode.java:61)
	at org.apache.jasper.compiler.ELNode$Nodes.visit(ELNode.java:214)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.validateFunctions(Validator.java:1610)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.getJspAttribute(Validator.java:1381)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1231)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:876)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1553)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2444)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2450)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:474)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
	at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1845)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:218)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657)
	at org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:240)
	at org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:578)
	at org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:49)
	at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:655)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1553)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2444)
	at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:659)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1553)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2444)
	at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:659)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1553)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2444)
	at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:659)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1553)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2444)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2450)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:474)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
	at org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcessor.java:673)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657)
	at org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:240)
	at org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:578)
	at org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:49)
	at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:655)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1553)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2444)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2450)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:474)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
	at org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcessor.java:673)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

틀렸어tld 파일 function:encodeUrl
<function>
		<description>
			Encodes given URL
		</description>
		<name>encodeUrl</name>
		<function-class>xx.xxxxx.xxxxxx.xxxxxxxxxx.tags.Functions</function-class>
		<function-signature>java.lang.String
                                  encodeUrl(java.lang.String)</function-signature>
	</function>

수정된 기능
        <function>
		<description>
			Encodes given URL
		</description>
		<name>encodeUrl</name>
		<function-class>xx.xxxxx.xxxxxx.xxxxxxxxxx.tags.Functions</function-class>
		<function-signature>java.lang.String encodeUrl(java.lang.String)</function-signature>
	</function>

네, 기능을 발견하지 못했습니다.
1. 잘못된
반환값 형식
방법명(매개 변수)

2. 고친 후
반환값 형식 방법명(매개 변수)
function-signature 탭에서 함수 성명과 반환 형식은 같은 줄에 있어야 합니다. 모두 Ctrl + Shift + F에 익숙해져서 일어난 일입니다!

좋은 웹페이지 즐겨찾기