Setting up a URL resource in Tomcat JNDI

S

success_ny

I need to set up a value of type java.net.URL in server.xml so that
it's accessible via JNDI from servlets running under Tomcat.

I.e., I need to set up a value that I can get in the code like this:

URL url = (URL) initialContext.lookup("url/configURL");

How do I do that? I tried the setting below, but it does not seem to
work for the type java.net.URL. Please help. Thanks!

<Resource auth="Container" name="url/configURL" scope="Shareable"
type="java.net.URL"/>

<ResourceParams name="url/configURL">
<parameter>
<name>spec</name>
<value>file:///C:/conf_files</value>
</parameter>
</ResourceParams>
 
S

success_ny

Dear Andrew,

If you have nothing to do say on the subject, you can as well be quiet
and not say anything. The point of this forum is to provide help to
other developers in need, not give your half-wit comments.
 
T

Thomas Weidenfeller

Andrew said:
What? Think you are extremely impatient and slightly
selfish for 'chasing up' a post less than a day old?

You missed his second "Anybody?" posting just a minute after that first
one. IIRC in August there was also some guy from JPM here, making an
equally good impression.

/Thomas
 
T

Thomas Weidenfeller

If you have nothing to do say on the subject, you can as well be quiet
and not say anything. The point of this forum is to provide help to
other developers in need, not give your half-wit comments.

Oh, we really like it when someone thinks this Usenet discussion group
is a "forum" and a help desk where he is entitled of help.

/Thomas
 
A

Andrew Thompson

Thomas said:
Oh, we really like it when someone thinks this Usenet discussion group
is a "forum" ...

Please feel free to slap me silly every time I use that word.

I do use it commonly, in it's wider sense..
"a public meeting or assembly for open discussion"

I like the parts 'public' and 'discussion', but it
seems it is open to being misunderstood for the term
'web forum'.

One of my (top 650) favorite words, made effectively
useless to communicate what I want to express. :-/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top