This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets and the fly likes Problems with TomCat, context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problems with TomCat, context" Watch "Problems with TomCat, context" New topic

Problems with TomCat, context

Tadeu Camargo

Joined: Apr 02, 2004
Posts: 6
Hi all,
I�m new in this forum. I hope help you when you need
and I hope that you help too... :-)
I�m trying to use the JNDI.
I�m using the Hibernate 2.0.2 with TomCat 4.1.*
I use also a plugin to load the hibernate.cfg.xml,
to set the SessionFactory in the context.
I would like to know about this.
for example: In the hibernate.cfg.xml I would like to use a JNDI,
but I�m not obtaining to configure correctly.

In the server.xml I put the following:

In the web.xml I put the following:

And How about the hibernate.cfg.xml? How can I do?
I�m doing:

To load some informations It was created the ProjPlugin with the init method that contains:

BUT when I start the Tomcat, it appears the NullPointerException in the line 78,
because the realDir was set to null. When I not USE the above context, this problem
does not occurs. I need to use JNDI and context.
Somebody can help me???
thank you very much

Tadeu Camargo da Silva
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

not sure if you will get a response for this question in this forum. This forum is for Servlet questions, and it appears that your question is about Apache/Tomcat. We do have a forum for Apache/Tomcat that would probably be a better place to post this. However, one of our other forums might also be a better bet for you.
Normally I would move this thread to a more appropriate forum. However, I am going to let you decide which forum this thread should belong to, before closing it here in the Servlets forum.
If you do decide to post it in a better forum, then please delete this thread here.
Thanks and welcome to JavaRanch.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Problems with TomCat, context
It's not a secret anymore!