I find this a little confusing...can you provide an example JSP and
web.xml that shows how I should do this?  Or would I be better off writing a data
access bean (not ejb bean) to handle the connection via JNDI?

Thanks,
Mark

>       AFAIK, JSPs cannpot yet access DB pools.  I think this is because
> of the ClassLoader situation.  Can anyone who has worked on the embedded
> Tomcat integration comment on whether this is supposed to work yet?
>       In any case, you shouldn't try to access the java:/DefaultDS
> directly.  As you suggest, you should add entries to the configuration
> files (web.xml for servlets/JSPs or ejb-jar.xml for EJBs) with a JNDI
name
> postfix you want to use (i.e. jdbc/MyDB) and then look them up in the
> instance-specifix JNDI context (java:comp/enb/jdbc/MyDB) - but I'm almost
> positive that we have not integrated *that* with Tomcat yet (though I
> think the Tomcat guys have maybe done so independently).
> 
> Aaron
> 
> On Thu, 30 Nov 2000 [EMAIL PROTECTED] wrote:
> > Hello everyone!  I am new to the jBoss community.  I am trying to
write a
> > simple JSP page that reads from a database.  I'm starting off with the
> > "DefaultDS" that comes with jBoss.  However, I get a "DefaultDS not
bound"
> > exception at runtime.  Here is the offending line of code:
> >
> > DataSource ds = (DataSource)new
> > InitialContext().lookup("java:/DefaultDS");
> >
> > I'm assuming I should use java:/DefaultDS since that's the binding
jBoss
> > shows in the console when it starts up.  This is not an EJB app
(yet)...just
> > one JSP page.  Do I need to add something to a deployment descriptor?
> >
> > Any suggestions?
> >
> > Thanks,
> > Mark Richman
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Problems?:           [EMAIL PROTECTED]
> >
> 
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
> 
 


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to