• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with custom tag

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this is jsp file

%@ taglib prefix="mine" uri="DiceFuntions" %>
<html><body>

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


</body></html>


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

<?xml version="1.0" encoding="UTF-8"?>
<taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_0.xsd"
version="2.0">
<tlib-version>1.2</tlib-version>

<uri>DiceFuntions</uri>
<function>
<name>rollIt</name>
<function-class>faq.DiceRoller</function-class>
<function-signature>int rollDice()</function-signature>
</function>

</taglib>


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 ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic