myeclipse+eclipse+tomcat5.5.20做struts运行页面总这样提示。
crespo1414
|
1#
crespo1414 发表于 2007-02-09 10:24
myeclipse+eclipse+tomcat5.5.20做struts运行页面总这样提示。
org.apache.jasper.JasperException: The absolute uri: http://jakarta.apache.org/struts/tags-bean cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause org.apache.jasper.JasperException: The absolute uri: http://jakarta.apache.org/struts/tags-bean cannot be resolved in either web.xml or the jar files deployed with this application org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114) org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316) org.apache.jasper.compiler.TagLibraryInfoImpl. <init> (TagLibraryInfoImpl.java:147) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1556) org.apache.jasper.compiler.Parser.parse(Parser.java:126) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211) org.apache.jasper.compiler.ParserController.parse(ParserController.java:100) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155) org.apache.jasper.compiler.Compiler.compile(Compiler.java:295) org.apache.jasper.compiler.Compiler.compile(Compiler.java:276) org.apache.jasper.compiler.Compiler.compile(Compiler.java:264) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) -------------------------------------------------------------- web.xml如下: <?xml version= "1.0 " encoding= "UTF-8 "?> <web-app xmlns= "http://java.sun.com/xml/ns/j2ee " xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance " version= "2.4 " xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd "> <servlet> <servlet-name> action </servlet-name> <servlet-class> org.apache.struts.action.ActionServlet </servlet-class> <init-param> <param-name> config </param-name> <param-value> /WEB-INF/struts-config.xml </param-value> </init-param> <init-param> <param-name> debug </param-name> <param-value> 3 </param-value> </init-param> <init-param> <param-name> detail </param-name> <param-value> 3 </param-value> </init-param> <load-on-startup> 0 </load-on-startup> </servlet> <servlet-mapping> <servlet-name> action </servlet-name> <url-pattern> *.do </url-pattern> </servlet-mapping> <jsp-config> <taglib> <taglib-uri> /tags/struts-bean </taglib-uri> <taglib-location> /WEB-INF/tlds/struts-bean.tld </taglib-location> </taglib> <taglib> <taglib-uri> /tags/struts-html </taglib-uri> <taglib-location> /WEB-INF/tlds/struts-html.tld </taglib-location> </taglib> <taglib> <taglib-uri> /tags/struts-logic </taglib-uri> <taglib-location> /WEB-INF/tlds/struts-logic.tld </taglib-location> </taglib> </jsp-config> </web-app> ------------------------------------------------------------------- jsp页面如下 <%@ page language= "java " pageEncoding= "ISO-8859-1 "%> <%@ taglib uri= "/tags/struts-bean " prefix= "bean "%> <%@ taglib uri= "/tags/struts-html " prefix= "html "%> <html> <head> <title> Struts Jsp </title> </head> <body> <html:form action= "/user " method= "post " scope= "request "> useraddr : <html:text property= "useraddr "/> <html:errors property= "errors.jsp.useraddr "/> <br/> username : <html:text property= "username "/> <html:errors property= "errors.jsp.username "/> <br/> id : <html:text property= "id "/> <html:errors property= "errors.jsp.id "/> <br/> <html:submit/> <html:reset> Reset </html:reset> </html:form> </body> </html> ---------------------------------------------------- 帮忙解决 谢谢 |