This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes converting scriptlet code into custom tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "converting scriptlet code into custom tag" Watch "converting scriptlet code into custom tag" New topic
Author

converting scriptlet code into custom tag

srinu reddy
Greenhorn

Joined: Oct 21, 2007
Posts: 12
Hi
pls.. let me know how to convert the below jsp code in to custom tag handler
-------------

--------------------------------
how to create custom tag for the above jsp and how to create tld for that


[BPSouther: Added code tags]

[ February 18, 2008: Message edited by: Ben Souther ]
[ February 18, 2008: Message edited by: Bear Bibeault ]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30361
    
150

Srinu,
The first step is to figure out what the code does. Does it output something? Set a page variable?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30361
    
150

Also, see the tag library tutorial.
srinu reddy
Greenhorn

Joined: Oct 21, 2007
Posts: 12
The first section, we need to declare constants in the handler and it should come to the page scope , so , how ans where to achieve that
The scond section is page variable and validation
It is urgent plss... give me a brief idea to achieve that

if possible pls.. explain in steps from tag handler , tld, and jsp so ...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Please use real words when posting to the forums. Abbreviations such as "plss" in place of "please" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

Also avoid using "urgent" in your posts. Everybody's questions are urgent and it just makes you seem pushy. Please read this for more information.

thanks,
bear
JavaRanch sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Anirudh Vyas
Ranch Hand

Joined: Oct 23, 2006
Posts: 93
Srinu,

blah, buy Head First servlets PERIOD. ( you'll know custom tags etc in 30 minutes ... well unless you don't know anything about jsps and servlets etc ... )

Regards
Vyas, Anirudh


Vyas, Anirudh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: converting scriptlet code into custom tag