首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

求助第一天用struts遇到的异常

2013-09-11 
求助第一天用struts遇到的错误%@pagelanguage java contentType text/htmlcharsetUTF-8 %%@tag

求助第一天用struts遇到的错误
<%@   page   language= "java "   contentType= "text/html;charset=UTF-8 "%>
<%@   taglib   uri= "/WEB-INF/struts-bean.tld "   prefix= "bean "   %>
<%@   taglib   uri= "/WEB-INF/struts-html.tld "   prefix= "html "   %>
<%@   taglib   uri= "/WEB-INF/struts-logic.tld "   prefix= "logic "   %>
<html:html   locale= "true ">
    <head>
       
        <title> <bean:message   key= "hello.jsp.title "/> </title>

    </head>
   
    <body>
        <bean:message   key= "hello.jsp.page.heading "/>
        <logic:present   name= "personbean "   scope= "request "/>
        <bean:message   key= "hello.jsp.page.hello "/>
        <bean:write   name= "personbean "   property= "userName "/>
        </logic:persent>
       
        <html:form   action= "/HelloWorld.do "   focus= "userName ">
        <bean:message   key= "hello.jsp.prompt.person "/>
        <html:text   property= "userName "   size= "16 "/> <br>
        <html:submit   property= "submit "   value= "submit "/>
        </html:form>
       
       
    </body>
</html:html>

错误报告:
description   The   server   encountered   an   internal   error   ()   that   prevented   it   from   fulfilling   this   request.

exception  

org.apache.jasper.JasperException:   Failed   to   load   or   instantiate   TagExtraInfo   class:   org.apache.struts.taglib.bean.CookieTei
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:453)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
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:   Failed   to   load   or   instantiate   TagExtraInfo   class:   org.apache.struts.taglib.bean.CookieTei
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:279)
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:422)
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248)
org.apache.jasper.compiler.TagLibraryInfoImpl. <init> (TagLibraryInfoImpl.java:162)
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:1552)


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:303)
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文件中的
<taglib>
<taglib-uri> /WEB-INF/taglib/struts-bean </taglib-uri>
<taglib-location> /WEB-INF/taglib/struts-bean.tld </taglib-location>
</taglib>
解释:
<taglib-uri> 中的值为jsp中 <%@ taglib uri= "/WEB-INF/struts-bean.tld " prefix= "bean "%>
uri中的值
<taglib-location> 为标签tld文件的物理位置。
都查看下是否对上了。
再不行就得查tld文件对应的标签类,是否导入进来了。是否对上了
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html

热点排行