Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

read manifest file during tomcat runtime

Posted on 2006-11-08
3
Medium Priority
?
1,875 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 400 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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

715 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