You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Greg Hess <gh...@wrappedapps.com> on 2003/03/17 18:02:13 UTC

DTD's and TLD's in Struts.jar Why?

Hi All,
 
One of my co workers is optimizing the deployment of my Struts based web
application. He has asked me why the Struts.jar contains DTD's and TLD's
and if not used would like to remove them to improve speed of
deployment. The only reason I can think of is for documentation and to
provide the users of the framework a complete resource for the Struts
framework. 
 
Is there any other reason they are included and am I correct with my
assumption?
 
Can the DTD's and TLD's in the Struts.jar be referenced within the
application?
 
Thanks,
 
Greg

Re: DTD's and TLD's in Struts.jar Why?

Posted by Dennis Muhlestein <de...@zserve.com>.
DTDS
They are used to validate xml files at deploy time.  Without them you
could 1) turn off the validation (not recommended) 2) The validator
would reference the dtds off the web site if they are not found in the
jar. (Probably not good either).

TLDS  
You can either put tlds in /WEB-INF/*.tld and reference them by there
hard coded location.  Or you can reference them by putting a reference
in web.xml and then using that (ie: /tags/struts-html )

But with a newer servlet container (2.3 and above I believe), you can
just put the url of the tld in your jsp (ie "<%@taglib
uri="http://jakarta.apache.org/struts/tld/struts-html" prefix="html"%> )
Thus, the reason they are included in the jar file.

That said.. 
Why would removing the dtds speed or ease deployment?  Seems like wasted
effort to me.  Leave the jar file as it is and enjoy the power of
struts.  

-Dennis


On Mon, 2003-03-17 at 10:02, Greg Hess wrote:
> Hi All,
>  
> One of my co workers is optimizing the deployment of my Struts based web
> application. He has asked me why the Struts.jar contains DTD's and TLD's
> and if not used would like to remove them to improve speed of
> deployment. The only reason I can think of is for documentation and to
> provide the users of the framework a complete resource for the Struts
> framework. 
>  
> Is there any other reason they are included and am I correct with my
> assumption?
>  
> Can the DTD's and TLD's in the Struts.jar be referenced within the
> application?
>  
> Thanks,
>  
> Greg


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org