• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Read File inside JAR or WAR file from third WAR file  RSS feed

 
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends

Please solve this

I have a war file deployed, it contains a Properties(or text) file.
in another server of same machine i have second war deplyed

Now i need to access that txt file in WAR1, in war 2 (same for jar too)

Please help how to access it as if i directly access the file it gives file notfound exception, may be it could not expolore WAR or JAR.

Thank You
 
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can your WAR1 application access this properties file properly? If yes, have you considered exposing a webservice/servlet which would return the required value(s)?
...may be it could not expolore WAR or JAR.

Did you confirm this or just thinking out loud
 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sir i think you could not understand my question, or i did not understand your answer

WAR 1 (A Code to Access Text file in WAR 2)
WAR 2 (Contains a text file which need to access by a code in WAR1)

Solution 1: To Open WAR 2 using ZIPFile and ZIPEntry classes, bring file on fly and access what we need
Solution 2: ?

Please suggest some other solution please
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!