I've read the logs a half-dozen times. If there's something there, I've missed it.
Now, having said that, there is another Context that's giving me an error message. I need to set up a couple of Contexts that point to static content in directories outside of the web application (assume they have images in them). There's no WEB-INF directory in either one of them, so Tomcat complains it can't start one of the Contexts (but only in one of them--don't understand why it complains about one and not the other). Still, if I reference an item through that path, Tomcat seems to find it. But, since it's a different Context than myapp, I assume it's not what's affecting things here. Yes, I did look at the docs, but since it took me three times to send this email the first time, I'm hardly in a position to criticize :-). Scott -----Original Message----- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 6:57 PM To: Tomcat Users List Subject: Re: Tomcat 5.5.16 configuration problem--THIRD RESEND also, did you check your logs yet? I bet there is a nice little error message in there for you :) Filip Scott Smith wrote: > You are correct. I thought path was required and implied the docBase (I > guess it's the other way around). So I changed it to: > > <Context docBase="myapp" path="/myapp"> > > However, that didn't change the error message. > > -----Original Message----- > From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] > Sent: Friday, April 14, 2006 4:56 PM > To: Tomcat Users List > Subject: Re: Tomcat 5.5.16 configuration problem--THIRD RESEND > > check your log files upon startup, your myapp.xml doesn't have a docBase > > attribute to associate it with the app itself. > <Context docBase="${catalina.home}/server/webapps/myapp" > path="/myapp">..... > > Scott Smith wrote: > >> Sorry, I sent this so many times. Hopefully, I have all of the typos >> out of it this time... >> >> >> >> I have specified the following as myapp.xml in the >> conf\Catalina\locahost directory: >> >> >> >> <Context path="/myapp"> >> >> >> >> <Resource name="jdbc/MyDB" auth="Container" >> >> type="javax.sql.DataSource" >> >> username="user" password="pswd" >> >> >> driverClassName="net.sourceforge.jtds.jdbc.Driver" >> >> >> >> > url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod > >> =cursor" >> >> maxActive="30" maxIdle="20" minIdle="10" >> maxWait="20000" /> >> >> <Realm >> > className="org.apache.catalina.realm.DataSourceRealm" > >> debug="99" >> >> dataSourceName="jdbc/MyDB" >> >> userTable="zUsers" userNameCol="zUserName" >> userCredCol="zPassword" >> >> userRoleTable="wsViewRoles" >> > roleNameCol="zRole" > >> /> >> >> </Context> >> >> >> >> In my web.xml file I have: >> >> >> >> <resource-ref> >> >> <res-ref-name>jdbc/MyDB</res-ref-name> >> >> <res-type>javax.sql.DataSource</res-type> >> >> <res-auth>Container</res-auth> >> >> </resource-ref> >> >> >> >> But, when I execute the code >> >> >> >> DataSource ds = null; >> >> try >> >> { >> >> Context initCtx = new InitialContext(); >> >> Context envCtx = (Context) >> initCtx.lookup("java:comp/env"); >> >> ds = (DataSource) envCtx.lookup("jdbc/MyDB"); >> >> } >> >> catch (NamingException e) >> >> { >> >> _log.error("Unable to retrieve MyDB >> > DataSource", > >> e); >> >> ds = null; >> >> } >> >> >> >> The exception is caught and I get an error message which says >> "javax.naming.NamingException: Name is not bound to a Context". I >> verified that the name in the <Resource>, <resource-ref> and the >> context lookup are the same. >> >> >> >> I suspect I understand the message. I just don't know what I've done >> wrong. Any suggestions? >> >> >> >> Scott >> >> >> >> >> >> >> >> >> >> > > > --------------------------------------------------------------------- > 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] > > > --------------------------------------------------------------------- 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]