Results 1 to 3 of 3

Thread: unsure of this..

  1. #1
    Join Date
    Jul 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default unsure of this..

    <%@ 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

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    This is JSP. You have to understand something of Java to comprehend this.
    Code:
    <%@ 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.
    Code:
    <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...
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank u.. now i understand.. thank a million

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •