File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes problem creating a URI for a tld in the web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "problem creating a URI for a tld in the web.xml" Watch "problem creating a URI for a tld in the web.xml" New topic
Author

problem creating a URI for a tld in the web.xml

Rama Krishna
Ranch Hand

Joined: Oct 16, 2007
Posts: 110
I am unable to add a .tld files' URI in the web.xml file so that I can start using it in a .jsp file.

I get the following error:
__________________________________________________________________
<!-- SeverityDescriptionResourceIn FolderLocationCreation TimeId
2cvc-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.
__________________________________________________________________

when using the web.xml in a workshop/weblogic environment. I was also wondering how to create these entries automatically in 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>
SQLToolBean</display-name>

<taglib>
<taglib-uri>/myTLD</taglib-uri>
<taglib-location>/WEB-INF/MyCustomTagLib.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>
__________________________________________________________________

Any suggestion or help in this regards will be appreciated!

Can we create entries into web.xml automatically or create a .tld file in weblogic/workshop??
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
If you take a look at the servlet specification, you will see that the taglib element is a sub-element of jsp-config in 2.4 spec.

There's a link to the specification in the ServletsFaq

16. jsp-config Element
Thejsp-config is used to provide global configuration information for the JSP
files in a web application. It has two sub-elements,taglib andjsp-property-
group. Thetaglib element can be used to provide information on a tag library
that is used by a JSP page within the Web application. See JavaServer Pages
specification version 2.0 for detail.

[ November 11, 2007: Message edited by: Carol Enderlin ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem creating a URI for a tld in the web.xml