<%@ taglib uri="http://jakarta.apache.org/taglibs/scrape-1.0" prefix="scrp" %> Example JSP using scrape taglib

Weather Quote



Example #1
The example below scrapes the page for the Columbia, Missouri weather forecast from the National Weather Service site. In this scrape, the anchors attribute was set to true, and the begin and end anchor attributes were set to the <PRE> and </PRE> tags that surround the forecast.


Example #2
This example scrapes the same page as the first example and uses the same anchors, but in this case the anchors attribute was set to false so that the anchors are stripped from the scrape result. Browsers typically treat text within <PRE> tags with a monospaced font and line breaks in the HTML are retained. Since the <PRE> and </PRE> tags are the anchors and they are removed from the scrape result, the formatting is noticeably different.


Example #3
This example scrapes the same page as the first two examples and uses the same anchors, but in this case the anchors attribute was set to false and the strip attribute was set to true so that the anchors and HTML tags are stripped from the scrape result.