File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes problem with custom tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem with custom tag" Watch "problem with custom tag" New topic

problem with custom tag


Joined: Dec 17, 2007
Posts: 1
this is jsp file

%@ taglib prefix="mine" uri="DiceFuntions" %>

This is new value : ${mine:rollIt()}


i wrote tld file and put that file in WEB-INF....but its not working

<?xml version="1.0" encoding="UTF-8"?>
<taglib xmlns=""

<function-signature>int rollDice()</function-signature>


java file content are

package faq;

public class DiceRoller {

public static int rollDice(){
return (int)((Math.random()*6)+1);

my web application server is jboss .......i created war file and deployed in deploy folder in jboss.....the output is.....

This is new value : ${mine:rollIt()}

its not showing correct output
[ December 17, 2007: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60783

Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

I have adjusted the subject of this post for you.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Consider Paul's rocket mass heater.
subject: problem with custom tag
Similar Threads
TLD file
Using TLD in JSP
Regarding TLD
wierd exception in EL function
Do we have write seperate .tld files for each EL?