问题描述
<ahref="write_diary.jsp?petId=${item.petId}">发表宠物日志</a>点击这个超连接的时候出现这个2010-10-3011:19:36org.apache.catalina.core.StandardWrapperValveinvoke严重:Servlet.service()forservletjspthrewexceptionorg.apache.jasper.JasperException:/write_diary.jsp(1,20)quotesymbolexpectedatorg.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)atorg.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)atorg.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)atorg.apache.jasper.compiler.Parser.parseAttribute(Parser.java:205)atorg.apache.jasper.compiler.Parser.parseAttributes(Parser.java:155)atorg.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:407)atorg.apache.jasper.compiler.Parser.parseDirective(Parser.java:494)atorg.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)atorg.apache.jasper.compiler.Parser.parse(Parser.java:138)atorg.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)atorg.apache.jasper.compiler.ParserController.parse(ParserController.java:103)atorg.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)atorg.apache.jasper.compiler.Compiler.compile(Compiler.java:315)atorg.apache.jasper.compiler.Compiler.compile(Compiler.java:295)atorg.apache.jasper.compiler.Compiler.compile(Compiler.java:282)atorg.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)atorg.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)atorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)atorg.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:717)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.aftvc.epet.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:34)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(UnknownSource)页面代码是这样的<body><strong><h2>发表新日记</h2></strong><html:formaction="diary"method="post"><html:hiddenproperty="operate"value="doAdd"></html:hidden><html:hiddenproperty="item.petId"value="${reuestScope.petId}"></html:hidden>日期:<html:textproperty="item.diaryDate"size="10"></html:text>是否公开<html:checkboxproperty="item.diaryIsPublic"></html:checkbox>天气:<html:textproperty="item.diaryWeather"size="10"></html:text><br>标题:<html:textproperty="item.diaryTitle"size="40"></html:text><br>内容:<html:textareaproperty="item.diaryContext"cols="50"rows="12"></html:textarea><br>宠主:<html:textproperty="item.diaryAuthor"value="${sessionScope.CUR_PET.petOwnerName}"></html:text><br>宠主Email:<html:textproperty="item.diaryAuthorEmail"value="${sessionScope.CUR_PET.petOwnerEmail}"></html:text><br><html:submit>提交</html:submit></html:form></body>
解决方案
本帖最后由 wang19891013 于 2010-10-30 11:30:05 编辑
解决方案二:
<ahref="write_diary.jsp?petId=${item.petId}">
(write_diary.jsp),还能提交到jsp页面?
解决方案三:
这个应该是符号写错了,<ahref="write_diary.jsp?petId=${item.petId}">上面这段代码的页面代码发出来看看
解决方案四:
write_diary.jsp,我猜测是由于你这个jsp文件的名称太长,导致服务器误报错误!你改短点试一下
解决方案五:
楼主很懒,到现在还没结贴
解决方案六:
quotesymbolexpectedJSP页面哪里缺少引号..仔细审查下
解决方案七:
write_diary.jsp(1,20)quotesymbolexpected提示write_diary.jsp的第1行的20个字符少双引号啊!当然这个提示信息不能全信,因为浏览器解析时不一定按我们写的代码结构显示。1、你在浏览器使用查看源代码看一下write_diary.jsp页面看看,即使是出错也页面也可以查看2、如果不行,还可以到tomcat下查看转换后的class文件啊,因为最终jsp页面都会转换成java类,就是我们说的servlet咯。