Solved

read manifest file during tomcat runtime

Posted on 2006-11-08
3
1,824 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
Comment Utility
File lib = application.getRealPath("/WEB-INF/lib");
File[] jars = lib.listFiles();
0
 

Author Comment

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

Expert Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
commonTwo  challenge 63 98
noX challenge 17 76
base64 decode encode 12 96
Unexpected HttpURLConnection connection behavior 2 46
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now