• 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

Not able to read XML file from dependent project

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have two projects in eclipse ,one is Web application and other is standalone.web application has deoendency with standalone ie I want to read some XML file which are placed in standalone application.I configured the as follows
In web application 's-build path i have added the standalone application and in dependency I also selected the standalone project.
When i deploy the application on Tomcat ,under the web application I can see standalone application.

When I run the code the XML file are not read from the standalone. so I extracted JAR from standalone and placed in the LIB of the web application ,now I read the XML files .

Can you please explain why it is not working if I added the standalone directly to web application in Eclipse
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does "the files are not read" mean? Are they found at all? Are there any exception?
 
sanjey asok
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes I got an exception saying file not found
 
Ulf Dittmer
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want us to help you, then you need to TellTheDetails. Is the file located where the code expects it?

You're aware that web apps don't have a default directory, and that you need to absolute paths, right?
 
sanjey asok
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a Project “A” (Standalone) which has a XML file called a.XML and have a web application “B” which has a dependency with Project A.SO in eclipse I add the Project “A” in project B using
Project Properties-> bulid Path ->Project

Now Project B has Project A in it.
In Project “B” web .xml ,I have the below code



Exception I got is


 
Ulf Dittmer
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So where *is* the file a.xml?
 
sanjey asok
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a.xml is in jar File is in Project A
 
sanjey asok
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please address this
 
reply
    Bookmark Topic Watch Topic
  • New Topic