JSP中用include标签动态引入其它文件报错:attribute for %>" is not properly terminated
HTTP Status 500 - /index1.jsp(263,23) attribute for %>" is not properly terminated
type Exception report
message /index1.jsp(263,23) attribute for %>" is not properly terminated
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /index1.jsp(263,23) attribute for %>" is not properly terminated org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:132) org.apache.jasper.compiler.Parser.parseAttributeValue(Parser.java:240) org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:205) org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:148) org.apache.jasper.compiler.Parser.parseForward(Parser.java:837) org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1094) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1423) org.apache.jasper.compiler.Parser.parse(Parser.java:130) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255) org.apache.jasper.compiler.ParserController.parse(ParserController.java:103) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185) org.apache.jasper.compiler.Compiler.compile(Compiler.java:354) org.apache.jasper.compiler.Compiler.compile(Compiler.java:334) org.apache.jasper.compiler.Compiler.compile(Compiler.java:321) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.36 logs.
2014-4-3 10:51:14 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\software\MyEclipse8.5\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;E:\tomcat6\bin
2014-4-3 10:51:14 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2014-4-3 10:51:14 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 319 ms
2014-4-3 10:51:14 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2014-4-3 10:51:14 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.36
2014-4-3 10:51:14 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor cms31.xml
FSM3.1-INFO: Job execution threads will use class loader of thread: main
(org.quartz.simpl.SimpleThreadPool) [2014-04-03 10:51:15,103]
FSM3.1-INFO: Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
(org.quartz.core.SchedulerSignalerImpl) [2014-04-03 10:51:15,130]
FSM3.1-INFO: Quartz Scheduler v.1.8.4 created. (org.quartz.core.QuartzScheduler) [2014-04-03 10:51:15,131]
FSM3.1-INFO: RAMJobStore initialized. (org.quartz.simpl.RAMJobStore) [2014-04-03 10:51:15,133]
FSM3.1-INFO: Scheduler meta-data: Quartz Scheduler (v1.8.4) ‘DefaultQuartzScheduler‘ with instanceId ‘NON_CLUSTERED‘
Scheduler class: ‘org.quartz.core.QuartzScheduler‘ - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool ‘org.quartz.simpl.SimpleThreadPool‘ - with 10 threads.
Using job-store ‘org.quartz.simpl.RAMJobStore‘ - which does not support persistence. and is not clustered.
(org.quartz.core.QuartzScheduler) [2014-04-03 10:51:15,134]
FSM3.1-INFO: Quartz scheduler ‘DefaultQuartzScheduler‘ initialized from default resource file in Quartz package: ‘quartz.properties‘
(org.quartz.impl.StdSchedulerFactory) [2014-04-03 10:51:15,137]
FSM3.1-INFO: Quartz scheduler version: 1.8.4 (org.quartz.impl.StdSchedulerFactory) [2014-04-03 10:51:15,138]
FSM3.1-INFO: ------- 作业调度初始化完毕。 -------- (com.fsm.task.SchedulerService) [2014-04-03 10:51:15,138]
FSM3.1-INFO: ------- 开始设置作业列表 ---------------- (com.fsm.task.SchedulerService) [2014-04-03 10:51:15,138]
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
FSM3.1-INFO: 任务表调度器中没有作业信息! (com.fsm.task.SchedulerService) [2014-04-03 10:51:16,302]
FSM3.1-INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
(org.quartz.core.QuartzScheduler) [2014-04-03 10:51:16,303]
FSM3.1-INFO: ------- 作业调度启动完毕。 ----------------- (com.fsm.task.SchedulerService) [2014-04-03 10:51:16,303]
2014-4-3 10:51:16 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
2014-4-3 10:51:16 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2014-4-3 10:51:16 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory blog0.1
2014-4-3 10:51:16 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(E:\tomcat6\webapps\blog0.1\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2014-4-3 10:51:16 org.apache.catalina.core.ApplicationContext log
信息: Loading Spring root WebApplicationContext
2014-4-3 10:51:18 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory docs
2014-4-3 10:51:18 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2014-4-3 10:51:18 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2014-4-3 10:51:18 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2014-4-3 10:51:18 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2014-4-3 10:51:18 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2014-4-3 10:51:18 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2014-4-3 10:51:18 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/14 config=null
2014-4-3 10:51:18 org.apache.catalina.startup.Catalina start
信息: Server startup in 4572 ms
2014-4-3 10:51:18 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /index1.jsp(263,23) attribute for %>" is not properly terminated
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:132)
at org.apache.jasper.compiler.Parser.parseAttributeValue(Parser.java:240)
at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:205)
at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:148)
at org.apache.jasper.compiler.Parser.parseForward(Parser.java:837)
at org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1094)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1423)
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.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
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:103)
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.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
<jsp:include page="${basePath}/header.jsp"></jsp:include>成功 苦逼的我之前这么写的<jsp:include page="${basePath}header.jsp"> 没用/. 再问个问题行不, 外部引用进来的JS,拿不到<%=basePath%>值啊,在页面内部的JS是可以的, 在外部文件中,我同样的写法,是拿不到这个值的.有什么办法可以拿到这个值呢?
<jsp:include page="<%=uri %>/include.jsp"></jsp:include>
报错:attribute for %>" is not properly terminated
原因:标签的page属性值可以是相对路径URL或者<%=表达式 %>,但同时只能存在其中一种
<jsp:include page="/frame/include.jsp"></jsp:include> 表示绝对路径
<jsp:include page="frame/include.jsp"></jsp:include> 表示相对路径
<jsp:include page="<%=uri %>"></jsp:include> 两个引号与<%=uri %>之间不能有空格JSP中用include标签动态引入其它文件报错:attribute for %>" is not properly terminated,古老的榕树,5-wow.com
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。