是这个在“作怪”
<!DOCTYPE taglib
        PUBLIC "-//Sun Microsystems, Inc.//
        DTD JSP Tag Library 1.1//EN"
        "http://java.sun.com/j2ee/dtds/
        web-jsptaglibrary_1_1.dtd">
这是对tld文件有效性检查的声明,如果你的tld文件中不符合这里dtd文件所定义的规范,那么他就要上sun的网站down一个,因此有connect time out。所以不是tld文件放置不正确,而是要检查这个的版本问题。你可以多看一下我的:
<!DOCTYPE taglib 
  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">

解决方案 »

  1.   

    web.xml加入
        <taglib>
            <taglib-uri>
       http://expert.csdn.net/MyTag/HelloTag
            </taglib-uri>
            <taglib-location>
               /WEB-INF/MyTag/HelloTag
            </taglib-location>
        </taglib>.tld文件的uri标签
    <uri>http://expert.csdn.net/MyTag/HelloTag</uri>
    JSP文件
    <%@ taglib uri="http://expert.csdn.net/MyTag/HelloTag" prefix="eg" %>
    <eg:hello/>
      

  2.   

    错了,是这个
        <taglib>
            <taglib-uri>
       http://expert.csdn.net/MyTag/HelloTag
            </taglib-uri>
            <taglib-location>
               /WEB-INF/MyTag/HelloTag.tld
            </taglib-location>
        </taglib>
      

  3.   

    to  youandi79(嘻嘻哈哈) ,为什么我修改了web.xml文件之后,重启之后将不能访问我的webapp了.什么文件都不能访问.
      

  4.   

    呵呵,多谢各位了,我知道出错的原因了.那是应为
    本来是这样的
    <!DOCTYPE taglib
      PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
      "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">我写断了行
    <!DOCTYPE taglib
      PUBLIC "-//Sun Microsystems, Inc.//
      DTD JSP Tag Library 1.1//EN"
      "http://java.sun.com/j2ee/dtds
      /web-jsptaglibrary_1_1.dtd">
    结果就出错了.to  youandi79(嘻嘻哈哈),其实在jsp中引用taglib有3中方法的,你的是其中一种In order to use the tag, we have to reference it, and this can be done in three ways: 
    1. Reference the tag library descriptor of an unpacked tag library. For example: 
    2. <@ taglib uri="/WEB-INF/jsp/mytaglib.tld" 
    3. prefix="first" %>
    4. Reference a JAR file containing a tag library. For example: 
    5. <@ taglib uri="/WEB-INF/myJARfile.jar" 
    6. prefix='first" %>
    7. Define a reference to the tag library descriptor from the web-application descriptor (web.xml) and define a short name to reference the tag library from the JSP. To do this, open the file: c:\tomcat\webapps\examples\web-inf\web.xml and add the following lines before the end line, which is <web-app>: 
    8.     <taglib>
    9.        <taglib-uri>mytags</taglib-uri>
    10.        <taglib-location>/WEB-INF/jsp/
    11.        mytaglib.tld</taglib-location>
    12.     </taglib>