PDA

View Full Version : unsure of this..



blue
07-06-2005, 02:44 PM
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>

<jsp:useBean id="dbselect" class="database.dbSelect" scope="session"/>

hi,
i got some enquires on this. just wondering if the <%@ page import="java.sql.*" %> is it a command? And what does it do?
useBean meaning they will take information from the "dbselect", database and session?
hope you all can correct me if i am wrong. thanks =)
Blue

Twey
07-07-2005, 06:14 PM
This is JSP. You have to understand something of Java to comprehend this.

<%@ page import="java.sql.*" %>means "allow every object in the java.sql package." A Java package is a sort of directory for objects, often called a namespace in other languages.
java.sql contains classes for dealing with databases and SQL. java.util contains generally useful classes, which aren't quite useful enough to be in java.lang, the default package: string tokenizers, calendar objects, and others.
<jsp:useBean id="dbselect" class="database.dbSelect" scope="session"/>... means "create a new instance of database.dbSelect called dbselect, with session scope."
ddadmin, there really ought to be a JSP forum with all these requests... :)

blue
07-08-2005, 08:20 AM
thank u.. now i understand.. thank a million