org.apache.jasper.JasperException: /mynewtag.jsp(10,22) quote symbol expected

2013-2-16 11:19:43 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /mynewtag.jsp(10,22) quote symbol expected
 at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
 at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
 at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
 at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:198)
 at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:148)
 at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1208)
 at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1422)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:130)
 at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
 at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
 at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
 at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
 at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
 at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
 at java.lang.Thread.run(Thread.java:619)

 

很简单的一个错误, /mynewtag.jsp(10,22) quote symbol expected 直接说明白了,mynewtag.jsp文件中第10行缺少引号……

原代码如下:


 

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tlds/diego.tld" prefix="diego" %>

	
	<%
		String s = "My New Tag Test!";
		request.setAttribute("name", s);
	%>	
		Test El supported TAG:
		${name}/>
	

 

添加引号后问题解决了:

 

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tlds/diego.tld" prefix="diego" %>

	
	<%
		String s = "My New Tag Test!";
		request.setAttribute("name", s);
	%>	
		Test El supported TAG:
		"${name}"/>
	


 


 

 


你可能感兴趣的:(Java,Web)