是这个在“作怪”
<!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">
<!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">
解决方案 »
- js动态添加上传文件
- IE的一个莫名其妙的问题
- 做用户注册窗口显示“ ORA-00928: 缺失 SELECT 关键字”
- jsp 提交excel到服务器
- @@@@@@@@@@@@@@@@@@@@@ 请教一个hibernate问题 @@@@@@@@@@@@@@@@@@@@@@@@
- jsp做视频会议的现成控件。
- 除了每个文件夹添加index.jsp外,如何防止用户直接查看文件夹的文件?
- showmodel打开窗口提交的窗口怎样能保证在此窗口中处理
- JdbcTemplate 利用Log4j 在控制台打印出SQL语句、参数
- 使用idea的时候遇到一问题,创建controller的时候创建失败
- 浏览JSP会弹出对话框
- jdbc连接报Response has already been committed什么问题呢
<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/>
<taglib>
<taglib-uri>
http://expert.csdn.net/MyTag/HelloTag
</taglib-uri>
<taglib-location>
/WEB-INF/MyTag/HelloTag.tld
</taglib-location>
</taglib>
本来是这样的
<!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>