Skip to main content

Using Struts 1.x without tld files

These are the "tag library descriptor" files that describe the custom tags in the various Struts tag libraries. The tld file for any Struts taglibs that you use should be copied into the WEB-INF directory of your web application. (Applications under Servlet 2.3 containers can omit this step if the standard uri is referenced.)

That can be achieved as follows.
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>


For Servlet 2.3/2.4 containers only: The Servlet 2.3 and 2.4 specifications simplify the deployment and configuration of tag libraries. The instructions above will work on older containers as well as 2.3 and 2.4 containers (Struts only requires a servlet 2.2 container); however, if you're using a 2.3/2.4 container such as Tomcat 4.x/5.x, you can take advantage of a simplified deployment.
All that's required to install the Struts tag libraries is to copy struts.jar into your /WEB-INF/lib directory and reference the tags in your code like this:


Note that you must use the full uri defined in the various tlds so that the container knows where to find the tag's class files. You don't have to alter your web.xml file or copy tlds into any application directories.

Comments

  1. what is the problem when we using tld files?


    why are you designing the application without tlds if struts frmework provides sme tlds?


    Surya
    Java Developer(Presently working on Struts)

    ReplyDelete
  2. what is the problem when we using tld files?


    why are you designing the application without tlds if struts frmework provides sme tlds?


    Surya
    Java Developer(Presently working on Struts)

    ReplyDelete

Post a Comment

Popular posts from this blog

Design Patterns using Java

According to Gang of Four(GOF) any software is classified in to one of the three categories. I read so many books about design patterns which provide a lot of information about Design Patterns in a language neutral way or related to a particular programming language. I am trying to complement the great books by providing the precise and concise information that is required in the day to day programming of a Java Developer. Any software can be classified into one of the three categories -Framework, Toolkit, Application. Framework - Framework defines a set of steps to create an application. Framework provides design reuse. Toolkit - Toolkit provides some utility functions to an existing application. Toolkit provides code reuse. Application - Application is some thing that is specific to the project, and is not useful outside the context of the current application. Gang of Four divided the Design Patterns in to 3 types based on their usage. There are 3 types of Gang of Fo