JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Servlet/JSP 討論區 » JSTL/EL  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友   
reply to postflat modego to previous topicgo to next topic
本主題所含的標籤
作者 JSTL+tomcat5.5.2+eclipes 部屬問題
kingzj

喵~



發文: 149
積分: 0
於 2010-11-26 15:42 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
最近拜讀良葛葛的 Servlet&JSP教學手冊

看到JSTL就想拿來用用
我的開發環境為
tomcat 5.5.2
eclipes 3.5

我在修改web.xml的時候寫入
1
2
3
4
<taglib>
  <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
  <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>

此時 eclipes 告訴我一個錯誤
我在網路上看到有人加上<jsp-config>
1
2
3
4
5
6
  <jsp-config>
    <taglib>
      <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
      <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
    </taglib>
  </jsp-config>

當然我這樣做
他就丟出Error 500
我有把 jstl.jar and stantard.jar 放到 WEB-INF/lib 內
以及 tld 也放在 WEB-INF 內
錯誤訊息似乎是找不到 JSTL 的 API
我的直覺是出在 web.xml 中我加入 <jsp-config>的關係
可是我摘掉他 我以為是eclipes 的問題
所以我部屬到真的 tomcat 上問題一樣
還請各位大大解惑><!!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
HTTP Status 500 -
 
type Exception report
 
message
 
description The server encountered an internal error () that prevented it from fulfilling this request.
 
exception
 
javax.servlet.ServletException: javax/servlet/jsp/tagext/TagLibraryValidator
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  com.controller.User.doGet(User.java:46)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
 
root cause
 
java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
  java.lang.ClassLoader.defineClass1(Native Method)
  java.lang.ClassLoader.defineClass(Unknown Source)
  java.security.SecureClassLoader.defineClass(Unknown Source)
  java.net.URLClassLoader.defineClass(Unknown Source)
  java.net.URLClassLoader.access$000(Unknown Source)
  java.net.URLClassLoader$1.run(Unknown Source)
  java.security.AccessController.doPrivileged(Native Method)
  java.net.URLClassLoader.findClass(Unknown Source)
  java.lang.ClassLoader.loadClass(Unknown Source)
  sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  java.lang.ClassLoader.loadClass(Unknown Source)
  java.lang.ClassLoader.loadClassInternal(Unknown Source)
  java.lang.ClassLoader.defineClass1(Native Method)
  java.lang.ClassLoader.defineClass(Unknown Source)
  java.security.SecureClassLoader.defineClass(Unknown Source)
  java.net.URLClassLoader.defineClass(Unknown Source)
  java.net.URLClassLoader.access$000(Unknown Source)
  java.net.URLClassLoader$1.run(Unknown Source)
  java.security.AccessController.doPrivileged(Native Method)
  java.net.URLClassLoader.findClass(Unknown Source)
  java.lang.ClassLoader.loadClass(Unknown Source)
  sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  java.lang.ClassLoader.loadClass(Unknown Source)
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1301)
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
  org.apache.jasper.compiler.TagLibraryInfoImpl.createValidator(TagLibraryInfoImpl.java:661)
  org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:247)
  org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:180)
  org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:430)
  org.apache.jasper.compiler.Parser.parseDirective(Parser.java:499)
  org.apache.jasper.compiler.Parser.parseElements(Parser.java:1558)
  org.apache.jasper.compiler.Parser.parse(Parser.java:130)
  org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245)
  org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
  org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:176)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
  org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  com.controller.User.doGet(User.java:46)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
 
root cause
 
java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TagLibraryValidator
  java.net.URLClassLoader$1.run(Unknown Source)
  java.security.AccessController.doPrivileged(Native Method)
  java.net.URLClassLoader.findClass(Unknown Source)
  java.lang.ClassLoader.loadClass(Unknown Source)
  sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  java.lang.ClassLoader.loadClass(Unknown Source)
  java.lang.ClassLoader.loadClassInternal(Unknown Source)
  java.lang.ClassLoader.defineClass1(Native Method)
  java.lang.ClassLoader.defineClass(Unknown Source)
  java.security.SecureClassLoader.defineClass(Unknown Source)
  java.net.URLClassLoader.defineClass(Unknown Source)
  java.net.URLClassLoader.access$000(Unknown Source)
  java.net.URLClassLoader$1.run(Unknown Source)
  java.security.AccessController.doPrivileged(Native Method)
  java.net.URLClassLoader.findClass(Unknown Source)
  java.lang.ClassLoader.loadClass(Unknown Source)
  sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  java.lang.ClassLoader.loadClass(Unknown Source)
  java.lang.ClassLoader.loadClassInternal(Unknown Source)
  java.lang.ClassLoader.defineClass1(Native Method)
  java.lang.ClassLoader.defineClass(Unknown Source)
  java.security.SecureClassLoader.defineClass(Unknown Source)
  java.net.URLClassLoader.defineClass(Unknown Source)
  java.net.URLClassLoader.access$000(Unknown Source)
  java.net.URLClassLoader$1.run(Unknown Source)
  java.security.AccessController.doPrivileged(Native Method)
  java.net.URLClassLoader.findClass(Unknown Source)
  java.lang.ClassLoader.loadClass(Unknown Source)
  sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  java.lang.ClassLoader.loadClass(Unknown Source)
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1301)
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
  org.apache.jasper.compiler.TagLibraryInfoImpl.createValidator(TagLibraryInfoImpl.java:661)
  org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:247)
  org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:180)
  org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:430)
  org.apache.jasper.compiler.Parser.parseDirective(Parser.java:499)
  org.apache.jasper.compiler.Parser.parseElements(Parser.java:1558)
  org.apache.jasper.compiler.Parser.parse(Parser.java:130)
  org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245)
  org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
  org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:176)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
  org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  com.controller.User.doGet(User.java:46)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
 
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.28 logs.
Apache Tomcat/5.5.28


reply to postreply to post
話題樹型展開
人氣 標題 作者 字數 發文時間
2478 JSTL+tomcat5.5.2+eclipes 部屬問題 kingzj 7785 2010-11-26 15:42
2346 Re:JSTL+tomcat5.5.2+eclipes 部屬問題 koji 75 2010-11-26 21:22
2329 Re:JSTL+tomcat5.5.2+eclipes 部屬問題 kingzj 1189 2010-11-26 22:56
2340 Re:JSTL+tomcat5.5.2+eclipes 部屬問題 koji 86 2010-11-27 08:08
2315 Re:JSTL+tomcat5.5.2+eclipes 部屬問題 kingzj 115 2010-11-29 10:54
2265 Re:JSTL+tomcat5.5.2+eclipes 部屬問題 pk09250317 126 2010-11-30 00:34
2262 Re:JSTL+tomcat5.5.2+eclipes 部屬問題 kingzj 266 2010-11-30 08:52
2243 Re:JSTL+tomcat5.5.2+eclipes 部屬問題 danbao825 156 2010-11-30 09:12
2235 Re:JSTL+tomcat5.5.2+eclipes 部屬問題 kingzj 355 2010-11-30 10:11
2235 Re:JSTL+tomcat5.5.2+eclipes 部屬問題 mylee 363 2010-11-30 10:15
2233 Re:JSTL+tomcat5.5.2+eclipes 部屬問題 kingzj 421 2010-11-30 10:22
2336 Re:JSTL+tomcat5.5.2+eclipes 部屬問題 mylee 411 2010-11-30 10:40
» JWorld@TW »  Servlet/JSP 討論區 » JSTL/EL

reply to postflat modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8