Meaningless Drivel is fun!*
The moose likes JSP and the fly likes jsp-api source code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp-api source code" Watch "jsp-api source code" New topic
Author

jsp-api source code

vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 218
HI Friends

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.

can any one help in this ........

Thanks & Regards
Vipul Kumar


Thanks
Vipul Kumar
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16160
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 218
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
Vipul Kumar.
vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 218
Hi.

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.

Apache Web Site

SVN is asking host name.which name i need to provide.

Anyone here in this forum downloaded tomcat source code..
please help in downloading tomcat source code.

Thanks & Regards,
Vipul Kumar.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Searching for "download tomcat source code" or some such phrase should get you results much quicker than waiting for a reply in a forum.
vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 218
Thanks Every one..

I have downloaded it already and thanks for everyone...

Thanks & Regards,
Vipul Kumar.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jsp-api source code