Tag library definition (TLD)

I wanted to change the tag library definition file (myapp\WEB-INF\jsp\xapplication.tld).
But it did not affect the working of my application.
How does the jsp files suggest which Java classes to use for the tags?
I have even changed the name of the xapplication.tld file as _xapplication.tld but this did not cause anything either.
Can anybody please help me about this?


X-Application Version: 3.1.1
Tamino Version : 3.1.1
Platform : Win2k,
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

Did you restart tomcat?
And you might try to delete Tomcats work
directory as well …

Michael

Software AG Germany, Darmstadt

I believe the link between jsp tag and class is as follows:

1) The jsp page contains a prefix like this:
<%@ taglib uri=“404” prefix=“bdm” %>

This relates all “bdm:” tags to a URI.

2) File “Web.xml” in the application’s “WEB-INF” directory contains lines like this:

404
/WEB-INF/jsp/xapplication.tld

These relate the URI from the jsp to a specific “tld” tag library file.

3) The “xapplication.tld” file contains entries like this:

module
com.softwareag.xtools.xapplication.jsptaglib.ModuleTag

This relates the tag bdm:module to class …ModuleTag.

Hope this helps.
X-Application Version: 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

[This message was edited by Bill Leeney on 17 Jan 2002 at 13:31.]

Hello,

I don’t know which changes you want to do, whether
(1) you want to change the behavior of existing by mapping the text to another class or
(2) you want to extend the library by an additional tag that invokes one of your classes.

For (2) I can give you perhaps some hints.

Let us assume that you have an X-Application which is in the wab-application directory of your Tomcat Server, e.g.

%TOMCAT_HOME%\webapps\myApplication

(a) which TLD file is used for your application is stored within the file
%TOMCAT_HOME%\webapps\myApplication\WEB-INF\web.lib

(see … )

For an X-Application is should be

/WEB-INF/jsp/xapplication.tld

This means the TLD file which affects your application is in

%TOMCAT_HOME%\webapps\myApplication\WEB-INF\jsp\xapplication.tld

If you rename this file and restart your Tomcat, your application should not work, because the file can not be found by Tomcat, when it tries to compile one of your JSP pages.

(b) You can add a new tag definition to the xapplication.tld file if you want. If doing this you should also copy a jar-file containing the java class/classes which implement(s) the behavior of your tag. The classes for the X-Application?s tags are in the file

%TOMCAT_HOME%\webapps\myApplication\WEB-INF\lib\xapplication.jar

To become familiar you could create a class that prints out a string “Hallo” into its BodyContent.

Hopefully, this will help to find out where you former problems are.

Bye,
Christian.

Thanks for interests.
I have restarted tomcat but forgat to delete the work directory.
The problem has been solved when I cleared the rork directory…