I am a newbie to custom tag libraries. I successfully executed my first example without any errors. Now iam very much interested in understanding how my server is executing the tld files. I mean how it is identifying the tld file.
I used debug mode in my editor(Eclipse).while debugging , the debugging gone to class files of jsp.
I wish to see the code of jsp,
i googled and unable to find the source code of jsp 2.1.
Technically, you don't "execute" tld files. TLD stands for Type Library Descriptor. TLD locations were originally specified in the web.xml deployment descriptor, but for a long time now, it has been possible to package up tag libraries and supply the TLD as part of the meta-info.
Standard JSP custom tags are basically just ordinary JavaBeans with certain extensions to support the necessary functions, and TLDs to describe their available attributes. For the record, JavaServer Faces (JSF) tags started out that way, but they have since sort of degenerated into a general chaos. Leave that for another day.
When a JSP is compiled, custom tags are compiled into java code as part of the overall java servlet code that is produced. If you're using Tomcat, both the generated Java code and the compiled class end up in Tomcat's work directory. When running Tomcat under IDE debugger control, just open up the java file and set a breakpoint. Or set a breakpoint in your tag code and walk back up the stack, if you have the webapp's work directory set as one of the project source directories for IDE debugging.
In Tomcat, the actual process of compiling a JSP and its tags into a servlet, then compiling the servlet into a class is handled by a component named "Jasper". You don't actually need to know how it works in detail, but if your curiosity runs in that direction, download the Tomcat source code.
An IDE is no substitute for an Intelligent Developer.
Joined: Oct 14, 2010
Thanks for your reply Tim.
I will post back again with successful or unsuccessfull result..
Any way you did not tell me where to download the Tomcat source code..
Thanks & Regards
Joined: Oct 14, 2010
I found Apache site useful for downloading Tomcat source code.
Apache site is providing its SVN(Sub version Reporsitory) url.But , i am unable to use that.