• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

how to configure a JNDI URL resource

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to replicate the Websphere's URL Resource provider functionality in Tomcat, but haven't been really successful. So what I would like to do is access a properties file from a URL. This provides a convenient approach to modifying prop files as apposed to residing within WAR file. Anyway back to my question, I have taken a stab at this and below is how my meta-inf\context.xml, web.xml, and jndi code snippet looks.

CONTEXT.XML


WEB.XML


JNDI Lookup code snippet



Its throwing an exception.

My question is if URL resource configuration is possible in Tomcat 5.5, and if so how.

thanks
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Any luck with this problem?

Regards,
Chandan
 
Rohit David
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nope. No one replied back. I am assuming you are trying to do something similar. However I found an alternative. I am configuring an env variable in the web xml. This url will offer more insight into this approach
http://wiki.metawerx.net/wiki/Web.xml.EnvEntry

After reading the url as string I conver it to a URL by doing a java.net.URL url = new URL (String value);

Hope this helps.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The right working solution you can find in this article: https://codelevain.wordpress.com/2010/12/18/url-as-jndi-resource/
There is a duplicate on stackoverflow: http://stackoverflow.com/questions/18351869/
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic