Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Is this possible to implement? .jsp/database Query.

  • 18-05-2011 05:35PM
    #1
    Registered Users, Registered Users 2 Posts: 427 ✭✭


    So I want to add a database to my website called music.
    You will be able to search by Song/Artist.

    Recently for a college assignment we made a basic library website allowing us to search for books and reserve them.

    We used .mdb file for a database. We accessed it with our data source:
    <%--setupdata source --%>
    <sql:setDataSource
    var ="booksdb"
    scope = "session"
    driver = "sun.jdbc.odbc.JdbcOdbcDriver"
    url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};
    DBQ=C:\apache-tomcat-6.0.32\webapps\myapps\assign\books.mdb"/>


    We carried out queries such as:
    <%--sql query that will select all the fields within the Categories table and display them in order by the column categoryID --%>
    <sql:query var="checkCategory" scope="request" dataSource = "${booksdb}">
    SELECT * From Categories
    ORDER BY CategoryID
    </sql:query>
    <jsp:include page="header.jsp" flush="true"/>

    We used tomcat.

    So I'm just wondering if this will be possible:
    To implement the same method through filezilla for my website?
    So I would drag my .mdb database into my files on filezilla.
    I would have my 2-3 necessary pages on filezilla.

    I'm obviously going to have to adjust my datasource but not sure what to?
    Do I need to bring tomcat onto my Filezilla? I presume no, because I'm already hosting my website on a server, so I can just locate my data source to that?

    I currently have my website up and running with just a few htmls files..etc

    I'm with register 365, using Filezilla, is this possible to implement into my website as it is the only method I have learned with using databases and I want users to be able to search song/artists.

    Thanks ;)


Comments

  • Registered Users, Registered Users 2 Posts: 427 ✭✭i124Q


    www.djbarcoe.com/query.jsp

    Why is this just giving me my jsp code and not displaying a table with the results from the database?

    Thanks ;)


  • Closed Accounts Posts: 10 Skiex


    Doesnt look like your running it through a java applet.

    You might want to look into that.

    What sort of server is hosting the site?

    Edit: Should read better.

    You need a java server. Looks like you have some a php server.


Advertisement