Saturday, September 10, 2005

Using Tag Library in JSP (for JBoss 4.0 Application Server)

1. in the first line of the JSP file add
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
(or any required tag library)
2. in the deployment descriptor (web.xml), you need to add the following in the <web-app> tag
...
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
version="2.4"
...
List TABLEs, SEQUENCEs or INDEXes in Oracle:

-- list TABLEs
SELECT object_name FROM user_objects WHERE object_type = 'TABLE';

-- list SEQUENCEs
SELECT object_name FROM user_objects WHERE object_type = 'SEQUENCE';

-- list INDEXes
SELECT object_name FROM user_objects WHERE object_type = 'INDEX';
Create user in Oracle:

-- create the user with username//password
CREATE USER username IDENTIFIED BY password;

-- grant appropriate role to the user
GRANT CONNECT TO username;
GRANT RESOURCE TO username;
Treeview development in web page: