Quote taglib ver. 1.4

    Custom JSP tag. This tag allows you to request stock quotes from the Net (http://finanace.yahoo.com) and proceed extracted values in your JSP pages.

For example:
Suppose you need to read stock quote for SUNW (Sun Microsystems):
 


<%@ taglib uri="taglib.tld" prefix="get" %>
<html>

<get:Quote symbol="SUNW" id="A" />

Last trade: <%=A[0]%>
Last value: <%=A[1]%>
Change absolute: <%=A[2]%>
Change in percents: <%=A[3]%>
Volume: <%=A[4]%>

</html>

Tags are:

Quote

Extracts stock quote for the given symbol. Tag stores extracted values in the page scope String array. Parameters are:

1) symbol stock symbol
2) id name for the page scope variable. It will be an array (java.lang.String []). Fields are: 0 - time for the last trade, 1 - last value, 2 - absolute change, 3 - change in percents, 4 - volume
 

for downloading:

Library: quotetag.jar    Description: taglib.tld

 © Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.

Related links: