JavaServer Pages Tag Library
This tutorial outlines the steps for creating a simple web-based application using KowariTM JavaServer PagesTM (JSP) tags.
Note - Some sections of this tutorial are still under construction.
Before you Begin
Before you begin this tutorial, you should be familiar with JSP development, including topics such as using tag libraries, deploying JSP pages and creating WAR files. You should also read the JavaServer Pages Tag Library section for detailed information on using the JSP tags used in this tutorial.
A completed version of this tutorial is available on the Demos section of the TucanaTM Downloads Web site. This version uses Apache Ant to simplify the build process, and Apache Tomcat as the servlet container. Please contact support@tucanatech.com to obtain a username and password.
You also need Kowari to be running.
Load the Sample Data
This tutorial uses sample vCards in RDF/XML format. Complete the following steps:
- Copy the following RDF and paste it into a file called
vcards.rdf .<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:vCard =" http://www.w3.org/2001/vcard-rdf/3.0#">
<rdf:Description rdf:about =" http://qqq.com/staff/ataylor" > <vCard:FN>Alex Taylor </vCard:FN> <vCard:N rdf:parseType="Resource"> <vCard:Family>Taylor</vCard:Family> <vCard:Given>Alex</vCard:Given> <vCard:Other>Perry</vCard:Other> <vCard:Prefix>Mr</vCard:Prefix> </vCard:N> <vCard:BDAY>1981-01-01</vCard:BDAY> <vCard:TITLE>Project Manager</vCard:TITLE> <vCard:ROLE>Management of projects</vCard:ROLE> <vCard:TEL rdf:parseType="Resource"> <rdf:value>+61 7 455 234</rdf:value> <rdf:type rdf:resource ="http://imc.org/vCard/3.0#work" /> <rdf:type rdf:resource ="http://imc.org/vCard/3.0#voice" /> </vCard:TEL> <vCard:EMAIL> <vCard:internet rdf:value="ataylor@qqq.com"/> </vCard:EMAIL> <vCard:ADR rdf:parseType="Resource"> <vCard:Street>45 Peterson Drive </vCard:Street> <vCard:Locality>Brisbane</vCard:Locality> <vCard:Pcode>4066</vCard:Pcode> <vCard:Country>Australia </vCard:Country> </vCard:ADR> <vCard:NOTE>Interested in eXtreme Programing</vCard:NOTE> </rdf:Description>
<rdf:Description rdf:about =" http://qqq.com/staff/ppan" > <vCard:FN>Peter Pan</vCard:FN> <vCard:N rdf:parseType="Resource"> <vCard:Family>Pan</vCard:Family> <vCard:Given>Peter</vCard:Given> <vCard:Prefix>Mr</vCard:Prefix> </vCard:N> <vCard:TITLE>Deck hand</vCard:TITLE> <vCard:ROLE>Actor</vCard:ROLE> <vCard:TEL rdf:parseType="Resource"> <rdf:value>+61 4193 34223</rdf:value> <rdf:type rdf:resource ="http://imc.org/vCard/3.0#mobile" /> </vCard:TEL> <vCard:EMAIL> <vCard:internet rdf:value="peter@qqq.com"/> </vCard:EMAIL> <vCard:ADR rdf:parseType="Resource"> <vCard:Street> Ocean Rd</vCard:Street> <vCard:Locality>Morton Bay</vCard:Locality> <vCard:Pcode>4239</vCard:Pcode> <vCard:Country>Australia</vCard:Country> </vCard:ADR> <vCard:NOTE>Mobile phone maybe out-of-range during week days</vCard:NOTE> </rdf:Description>
<rdf:Description rdf:about =" http://qqq.com/staff/bsimpson" > <vCard:FN>Bart Simpson</vCard:FN> <vCard:N rdf:parseType="Resource"> <vCard:Family>Simpson</vCard:Family> <vCard:Given>Bart</vCard:Given> <vCard:Prefix>Master</vCard:Prefix> </vCard:N> <vCard:TITLE>Comic character</vCard:TITLE> <vCard:ROLE>Cause mayhem</vCard:ROLE> <vCard:TEL rdf:parseType="Resource"> <rdf:value>+61 045 45665 456</rdf:value> <rdf:type rdf:resource ="http://imc.org/vCard/3.0#mobile" /> </vCard:TEL> <vCard:EMAIL> <vCard:internet rdf:value="bart@simpsons.com"/> </vCard:EMAIL> <vCard:ADR rdf:parseType="Resource"> <vCard:Street>Jackson Rd</vCard:Street> <vCard:Locality>New York</vCard:Locality> <vCard:Pcode>4249</vCard:Pcode> <vCard:Country>US</vCard:Country> </vCard:ADR> <vCard:NOTE>Possesses little brains</vCard:NOTE> </rdf:Description>
<rdf:Description rdf:about =" http://qqq.com/staff/lsimpson" > <vCard:FN>Lisa Simpson</vCard:FN> <vCard:N rdf:parseType="Resource"> <vCard:Family>Simpson</vCard:Family> <vCard:Given>Lisa</vCard:Given> <vCard:Prefix>Ms</vCard:Prefix> </vCard:N> <vCard:ROLE>Smart Responsible Student</vCard:ROLE> <vCard:TEL rdf:parseType="Resource"> <rdf:value>+61 045 45665 456</rdf:value> <rdf:type rdf:resource ="http://imc.org/vCard/3.0#mobile" /> </vCard:TEL> <vCard:EMAIL> <vCard:internet rdf:value="lisa@simpsons.com"/> </vCard:EMAIL> <vCard:ADR rdf:parseType="Resource"> <vCard:Street>Jackson Rd</vCard:Street> <vCard:Locality>New York</vCard:Locality> <vCard:Pcode>4249</vCard:Pcode> <vCard:Country>US</vCard:Country> </vCard:ADR> <vCard:NOTE>Possesses mostly of brains</vCard:NOTE> </rdf:Description>
</rdf:RDF>
- Using the Kowari ViewerTM or the iTQLTM command line interface, create a model to store the vCard data. Use the following iTQL command:
create <rmi://mysite.com/server1#vcards>;
The following message displays:
Successfully created model rmi://mysite.com/server1#vcard
- Load the sample vCard data into the model just created, using the following iTQL command:
load <file:/home/user/jspdemo/vcards.rdf> into <rmi://mysite.com/server1#vcard>;
The following message displays:
Successfully loaded 78 statements from file:/home/user/jspdemo/vcards2.rdf into rmi://localhost/server1#vcard
Develop the JSPs
Deploy the JSPs
Open the Application
When you have developed the application, connect to it with your web browser by opening the page, http://localhost/jspdemo/index.jsp.
|
|
Latest News
Kowari 1.1.0 Pre-release 1 Released
Kowari 1.0.5 Released
Kowari 1.0.4.1 Released
Kowari 1.0.4 Released
DAWG Evaluates iTQL
Kowari article in XML.com
Kowari mentioned on XML.com
Kowari 1.0.3 Released
Kowari Lite Introduced
Kowari 1.0.2 Released
Kowari 1.0.1 Released
View all news items
|