Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
| Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 14th, 2004, 05:02 AM
Registered User
 
Join Date: Jul 2004
Location: mumbai, maharastra, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to protozoa
Default Unable to get connection, DataSource invalid: prob

My code is as follows

<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/sql_rt" prefix="sql" %>

<sql:setDataSource var="datasource"
                     url="jdbc:mysql://localhost:8080/publish"
                    driver="org.gjt.mm.mysql.Driver"
                   user="root" password="admin" />


           <sql:query var="publish">

            select id,title,price from book
            </sql:query>

            <html>
            <head>
            <body>
            <table>
            <tr>
            <td>id</td>
            <td>title</td>
            <td>price</td>
            <c:forEach items="${publish.row}" var="row">
            <tr>
            <td>
            <c:out value="${row.id}" /></td>
            <td>
            <c:out value="${row.title}" /></td>
            <td>
            <c:out value="${row.price}" /></td>
            </tr>
            </c:forEach>
            </table>
            </body>
            </head>
            </html>

and the error that i am getting

org.apache.jasper.JasperException: Unable to get connection, DataSource invalid: "null"


I am working on Suse 9.0...

i have included mysql-connector-java-2.0.14-bin.jar in tomca/common/lib still the error doesn't go.


protozoa
  #2 (permalink)  
Old August 19th, 2004, 02:40 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , India.
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

You can refer for sample code & driver download other information tooo

http://www.oreilly.com/catalog/javad...pter/ch04.html



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrox United - Database Connection Prob Martin Rushton BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 December 26th, 2012 08:22 AM
DataSource connection with mysql joychand Struts 0 April 24th, 2007 10:19 AM
Invalid Connection String Attribute rstelma Classic ASP Databases 8 July 6th, 2005 06:31 PM
Cannot create connection to datasource boson BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 3 March 16th, 2005 02:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.