Solved

read manifest file during tomcat runtime

Posted on 2006-11-08
3
1,854 Views
Last Modified: 2013-11-24
Hi all

I have made a web application running on Tomcat.
The application is as war file, which contains multiple jar files in /lib folder.

I would like to show how many jar files are using in the war, and which version they are using.

How to achieve it (without hardcode the physical location of the files) ?
I tried to check the java.class.path but it does not work.

Rgds/Glogin
0
Comment
Question by:glogin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 17896931
File lib = application.getRealPath("/WEB-INF/lib");
File[] jars = lib.listFiles();
0
 

Author Comment

by:glogin
ID: 17896949
Thanks.
How can I get the application from java bean / java program, instead of JSP?
0
 
LVL 92

Expert Comment

by:objects
ID: 17896967
a java application will not have a ServletContext, only in web applications .
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question