• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reading ear manifest.mf from JSP

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

In order to display application ear version,I need to access ear-specific Manifest.mf file from my jsp.
When I do:
application.getResourceAsStream("META-INF/MANIFEST.MF")
it gives me the war specific Manifest.mf(as expected) .
Changin it to application.getResourceAsStream("../META-INF/Manifest.mf") returns null.

I also tried few other things like but they all return null:
1. ClassLoader.getSystemClassLoader().getResourceAsStream(" META-INF/Manifest.mf")
2.this.getClass().getClassLoader().getParent().getResourceAsStream(" META-INF/Manifest.mf")
Here is my structure
abc.ear
- META-INF ( has manifest.mf and application.xml)

- xyz.war ( has readmanifest.jsp/WEB-INF/ META-INF->manifest.mf )
readmanifest.jsp should read manifest.mf one level up.

How do I get hold of the ear-level( app level) Classloader in Websphere?
Is there an alternate way to achieve what I am trying to do?

Thanks in advance.

[ November 21, 2007: Message edited by: K Thapa ]
[ November 21, 2007: Message edited by: K Thapa ]
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have solution for your problem?
 
K Thapa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use basic java I/O. Something like:
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic