[SEAM] 学习seam中的numberguess的例子中,“jsp:output”不识别的错误,请教大家。
abelzcg
2009-02-11
在学习seam中的numberguess的例子,
遇到下面的问题,开发环境是eclipse+jboss tools, 部署好后,报出下面的错误,说“numberGuess.jspx”中的“jsp:output”标签不识别,请问是什么地方有问题导致的? javax.servlet.ServletException: /numberGuess.jspx @11,90 <jsp:output> Tag Library supports namespace: http://java.sun.com/JSP/Page, but no tag was defined for name: output javax.faces.webapp.FacesServlet.service(FacesServlet.java:270) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177) org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267) org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380) org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507) org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 原因 com.sun.facelets.tag.TagException: /numberGuess.jspx @11,90 <jsp:output> Tag Library supports namespace: http://java.sun.com/JSP/Page, but no tag was defined for name: output com.sun.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:193) com.sun.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:194) org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) org.apache.xerces.parsers.XMLParser.parse(Unknown Source) org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) javax.xml.parsers.SAXParser.parse(Unknown Source) com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:232) com.sun.facelets.compiler.Compiler.compile(Compiler.java:105) com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:218) com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:149) com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:100) com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:517) com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567) org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108) org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:196) com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177) org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267) org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380) org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507) org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 谢谢! |
|
abelzcg
2009-02-11
附上numberGuess.jspx文件的内容
<?xml version="1.0"?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib" xmlns="http://www.w3.org/1999/xhtml" version="2.0"> <jsp:output doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> <jsp:directive.page contentType="text/html"/> <html> <head> <title>Guess a number...</title> <link href="niceforms.css" rel="stylesheet" type="text/css" /> <script language="javascript" type="text/javascript" src="niceforms.js"><!-- --></script> </head> ..... ..... ..... |
|
abelzcg
2009-02-11
把 <jsp:output doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> <jsp:directive.page contentType="text/html"/> 给删除了,就正常了,不懂啊,谁给咱解释解释 |
|
dearshor
2009-02-11
从stack trace来看,是因为"http://java.sun.com/JSP/Page" 这个namespace中没有定义“output”这个元素。
你是在哪个server上跑的?这个server支持的servlet/jsp规范是什么版本? |
|
abelzcg
2009-02-11
dearshor 写道 从stack trace来看,是因为"http://java.sun.com/JSP/Page" 这个namespace中没有定义“output”这个元素。
你是在哪个server上跑的?这个server支持的servlet/jsp规范是什么版本? 谢谢!!! 我是在jboss 5.0 的 default模式下。 “server支持的servlet/jsp规范是什么版本?”这个怎么看? |