Setting up a URL resource in Tomcat JNDI

Discussion in 'Java' started by success_ny@yahoo.com, Oct 19, 2005.

  1. Guest

    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>
     
    , Oct 19, 2005
    #1
    1. Advertising

  2. Guest

    Anybody?
     
    , Oct 20, 2005
    #2
    1. Advertising

  3. Guest

    Anybody?
     
    , Oct 20, 2005
    #3
  4. wrote:

    > Anybody?


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

    ...Me, for one.
     
    Andrew Thompson, Oct 20, 2005
    #4
  5. Guest

    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.
     
    , Oct 20, 2005
    #5
  6. Roedy Green Guest

    Roedy Green, Oct 20, 2005
    #6
  7. Thomas Weidenfeller, Oct 20, 2005
    #7
  8. Chris Uppal Guest

    wrote:

    > The point of this forum is to provide help to
    > other developers in need


    Utterly wrong.

    -- chris
     
    Chris Uppal, Oct 20, 2005
    #8
  9. wrote:
    > 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
    --
    The comp.lang.java.gui FAQ:
    ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
    http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
     
    Thomas Weidenfeller, Oct 20, 2005
    #9
  10. Thomas Weidenfeller wrote:
    > wrote:
    >
    >> 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" ...


    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. :-/
     
    Andrew Thompson, Oct 20, 2005
    #10
  11. Roedy Green Guest

    On Thu, 20 Oct 2005 15:48:00 +0100, "Chris Uppal"
    <-THIS.org> wrote or quoted :

    >> The point of this forum is to provide help to
    >> other developers in need

    >
    >Utterly wrong.


    what do you think it is?

    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Oct 22, 2005
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cccc

    JNDI: Tomcat + Oracle

    cccc, May 13, 2004, in forum: Java
    Replies:
    1
    Views:
    4,044
    Igor N. Kolomiyets
    May 13, 2004
  2. Mike S
    Replies:
    0
    Views:
    23,020
    Mike S
    Sep 16, 2004
  3. Mick
    Replies:
    2
    Views:
    9,565
    Marcin Grunwald
    Feb 23, 2005
  4. raymi
    Replies:
    0
    Views:
    634
    raymi
    Aug 11, 2006
  5. Replies:
    2
    Views:
    728
Loading...

Share This Page