This week's giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP and have Lucian Maly on-line!
See this thread for details.
Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Naming Exception in tomcat-3.3

Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I got an issue with JNDI look up in jakarta-tomcat-3.3a version.(I cannot upgrade my tomcat version.)

I'm getting this error while trying to lookup my jndi name.

"javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial"

With jakarta-tomcat-5.0.18 version i'm able to lookup jndi name,but the sad story is is i need to make this work in jakarta-tomcat-3.3a

The steps followed
(1) Created one apps_myapp.xml(I tired adding the context in server.xml also.)
<?xml version="1.0" encoding="ISO-8859-1"?>
<Context path="/myapp" docBase="webapps/myapp" debug="0">
<Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/mydb">
<name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>


` </parameter>







(2)Added to my web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
<description>Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file.</description>

Any one who worked with jakarta-tomcat-3.3a ,please help me

Thanks in Advance
Chandrasekhar S.
You get good luck from rubbing the belly of a tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
    Bookmark Topic Watch Topic
  • New Topic