It goes without saying that you've followed this to
the letter:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html
Did you add these tags to your web.xml?
<resource-ref>
<description>Your datasource for testing</description>
<res-ref-name>jdbc/yourDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
With this setup, I use the JNDI lookup string
"jdbc/yourDataSource".
You've got to add the <Resource> to your Context, too.
- MOD
--- Andik Yulianto <[EMAIL PROTECTED]> wrote:
> Yes, there are many black boxes in software world:)
> I've tried some advices but still fail.
>
> I lookup the JNDI and get the DataSource:
> OracleDataSource
> dataSource=(OracleDataSource)ctx.lookup("jdbcparm");
> out.print(dataSource.getConnection());
>
> But error in jstl sql tag:
> <sql:setDataSource dataSource='jdbcparm'/>
> when I try to use invalid string, it yields the same
> error: No Suitable
> Driver
> <sql:setDataSource dataSource='anystring'/>
> So, I think the JNDI entry is not recognized by
> JSTL.
>
> I use tomcat 4.0 JDK 1.4.1 under solaris 5.8
>
> > -----Original Message-----
> > From: Michael Duffy [mailto:[EMAIL PROTECTED]
> > Sent: Friday, June 20, 2003 8:53 PM
> > To: Tag Libraries Users List
> > Subject: Re: Oracle JNDI
> >
> >
> >
> > Not again! ;)
> >
> > See Riaan's thread. This just got hashed out over
> the
> > course of a week. Are you using WebLogic?
> >
> > --- Andik Yulianto <[EMAIL PROTECTED]>
> wrote:
> > > I put an OracleDataSource in JNDI using
> > > bind("jdbcparm",ds) in
> > > initialization servlet.
> > > My JSP page is contains:
> > > <sql:setDataSource dataSource='jdbcparm'/>
> > > I call ds.getConnection() in the servlet, and
> it's
> > > OK.
> > >
> > > But it showns an error in the JSP
> > > javax.servlet.ServletException: Unable to get
> > > connection, DataSource
> > > invalid: "No suitable driver".
> > >
> > > Anyone can help??
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]