Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » TagLibs ??????
TagLibs ?????? [message #177083] Wed, 16 August 2006 07:02 Go to next message
Eclipse User
Originally posted by: luc_jn.yahoo.com

I am trying to use taglis from http://jakarta.apache.org/taglibs/
Can I use taglib in web.xml created during the creation of dynamic web
proejct ?

Here is the web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
mok</display-name>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/datetime-1.0</taglib-uri>

<taglib-location>/WEB-INF/datetime.tld</taglib-location>
</taglib>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
Here is the errors.

ERROR:
Severity and Description Path Resource Location
Creation Time Id
cvc-complex-type.2.4.a: Invalid content was found
starting with element 'taglib'. One of
'{"http://java.sun.com/xml/ns/j2ee":description,
"http://java.sun.com/xml/ns/j2ee":display-name,
"http://java.sun.com/xml/ns/j2ee":icon,
"http://java.sun.com/xml/ns/j2ee":distributable,
"http://java.sun.com/xml/ns/j2ee":context-param,
"http://java.sun.com/xml/ns/j2ee":filter,
"http://java.sun.com/xml/ns/j2ee":filter-mapping,
"http://java.sun.com/xml/ns/j2ee":listener,
"http://java.sun.com/xml/ns/j2ee":servlet,
"http://java.sun.com/xml/ns/j2ee":servlet-mapping,
"http://java.sun.com/xml/ns/j2ee":session-config,
"http://java.sun.com/xml/ns/j2ee":mime-mapping,
"http://java.sun.com/xml/ns/j2ee":welcome-file-list,
"http://java.sun.com/xml/ns/j2ee":error-page,
"http://java.sun.com/xml/ns/j2ee":jsp-config,
"http://java.sun.com/xml/ns/j2ee":security-constraint,
"http://java.sun.com/xml/ns/j2ee":login-config,
"http://java.sun.com/xml/ns/j2ee":security-role,
"http://java.sun.com/xml/ns/j2ee":env-entry,
"http://java.sun.com/xml/ns/j2ee":ejb-ref,
"http://java.sun.com/xml/ns/j2ee":ejb-local-ref,
"http://java.sun.com/xml/ns/j2ee":service-ref,
"http://java.sun.com/xml/ns/j2ee":resource-ref,
"http://java.sun.com/xml/ns/j2ee":resource-env-ref,
"http://java.sun.com/xml/ns/j2ee":message-destination-ref,
"http://java.sun.com/xml/ns/j2ee":message-destination,
"http://java.sun.com/xml/ns/j2ee":locale-encoding-mapping-list}'
is expected. mok/WebContent/WEB-INF web.xml line 5
1155578068703 39
Re: TagLibs ?????? [message #177090 is a reply to message #177083] Wed, 16 August 2006 11:04 Go to previous message
Bernhard Huemer is currently offline Bernhard Huemer
Messages: 2
Registered: July 2009
Junior Member
Hello,

taglibs have to be placed within their intented configuration context
("jsp-config") [1].

<?xml version="1.0" encoding="UTF-8"?>
<web-app ... >
<jsp-config>
<taglib>
....
</taglib>
</jsp-config>
</web-app>

greetings
Bernhard Huemer

[1]: http://www.onjava.com/pub/a/onjava/2003/12/03/JSP2part2.html

> I am trying to use taglis from http://jakarta.apache.org/taglibs/
> Can I use taglib in web.xml created during the creation of dynamic web
> proejct ?
>
> Here is the web.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_ID" version="2.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
> <display-name>
> mok</display-name>
> <taglib>
> <taglib-uri>http://jakarta.apache.org/taglibs/datetime-1.0</taglib-uri>
>
> <taglib-location>/WEB-INF/datetime.tld</taglib-location>
> </taglib>
> <welcome-file-list>
> <welcome-file>index.html</welcome-file>
> <welcome-file>index.htm</welcome-file>
> <welcome-file>index.jsp</welcome-file>
> <welcome-file>default.html</welcome-file>
> <welcome-file>default.htm</welcome-file>
> <welcome-file>default.jsp</welcome-file>
> </welcome-file-list>
> </web-app>
> Here is the errors.
>
> ERROR:
> Severity and Description Path Resource Location
> Creation Time Id
> cvc-complex-type.2.4.a: Invalid content was found
> starting with element 'taglib'. One of
> '{"http://java.sun.com/xml/ns/j2ee":description,
> "http://java.sun.com/xml/ns/j2ee":display-name,
> "http://java.sun.com/xml/ns/j2ee":icon,
> "http://java.sun.com/xml/ns/j2ee":distributable,
> "http://java.sun.com/xml/ns/j2ee":context-param,
> "http://java.sun.com/xml/ns/j2ee":filter,
> "http://java.sun.com/xml/ns/j2ee":filter-mapping,
> "http://java.sun.com/xml/ns/j2ee":listener,
> "http://java.sun.com/xml/ns/j2ee":servlet,
> "http://java.sun.com/xml/ns/j2ee":servlet-mapping,
> "http://java.sun.com/xml/ns/j2ee":session-config,
> "http://java.sun.com/xml/ns/j2ee":mime-mapping,
> "http://java.sun.com/xml/ns/j2ee":welcome-file-list,
> "http://java.sun.com/xml/ns/j2ee":error-page,
> "http://java.sun.com/xml/ns/j2ee":jsp-config,
> "http://java.sun.com/xml/ns/j2ee":security-constraint,
> "http://java.sun.com/xml/ns/j2ee":login-config,
> "http://java.sun.com/xml/ns/j2ee":security-role,
> "http://java.sun.com/xml/ns/j2ee":env-entry,
> "http://java.sun.com/xml/ns/j2ee":ejb-ref,
> "http://java.sun.com/xml/ns/j2ee":ejb-local-ref,
> "http://java.sun.com/xml/ns/j2ee":service-ref,
> "http://java.sun.com/xml/ns/j2ee":resource-ref,
> "http://java.sun.com/xml/ns/j2ee":resource-env-ref,
> "http://java.sun.com/xml/ns/j2ee":message-destination-ref,
> "http://java.sun.com/xml/ns/j2ee":message-destination,
> "http://java.sun.com/xml/ns/j2ee":locale-encoding-mapping-list}'
> is expected. mok/WebContent/WEB-INF web.xml line 5
> 1155578068703 39
Previous Topic:Callisto WTP: create web service including other types
Next Topic:FTP3.2 plugin question
Goto Forum:
  


Current Time: Thu Oct 23 14:03:26 GMT 2014

Powered by FUDForum. Page generated in 0.01693 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software