Trouble accessing XML files inside a .jar

Discussion in 'Java' started by Piper707@hotmail.com, May 24, 2006.

  1. Guest

    Hi,

    I'm having trouble trying to acccess XML files inside a .jar

    1) When the .jar lives in a .war, the files are found correctly. i.e.

    logic.jar structure:
    ---------------
    src/com/test/xmlFiles/*.xml
    src/com/test/xyz.class

    test.war structure:
    ---------------
    test.war/WEB-INF/lib/logic.jar -- files found correctly

    ..war deployment:
    ----------------
    Jboss/server/default/deploy/test.war

    2) But if the .jar is deployed in lib, it doesn't find the XML files,
    although the path to the XML files shown is correct

    Jboss/server/default/lib/logic.jar -- files NOT found

    path shown:
    -----------
    Jboss/server/default/lib/logic.jar!/src/com/test/xmlFiles/

    could this be a classloader issue? The calls to the xml files go from
    the jsp pages in the .war.
    In the first case, the jsp's and the xml both live in the same .war,
    but in the 2nd case, the xml files are in a .jar
    (Jboss/server/default/lib/) while the jsp pages continue to remain in a
    ..war (Jboss/server/default/deploy/).

    If it is, how can I get around it?

    The idea is to keep the XML files bundled in a single location (.jar)
    so that any .war files that need access to it don't need to include
    them.

    Thanks for any help
    Rohit
    , May 24, 2006
    #1
    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. harry
    Replies:
    1
    Views:
    483
    Sudsy
    Nov 22, 2004
  2. Arnold Peters
    Replies:
    0
    Views:
    567
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,718
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,752
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    657
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page