Solved

read manifest file during tomcat runtime

Posted on 2006-11-08
3
1,844 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
  • 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

Title # Comments Views Activity
ejb wildfly example 2 21
Java basic valueOf question 1 29
collection output issue 9 36
Running JavaFX on the Raspberry Pi 27 39
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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

856 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