aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes How to get value of Application Build Level (i.e. Implementation-Version) in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to get value of Application Build Level (i.e. Implementation-Version) in JSP" Watch "How to get value of Application Build Level (i.e. Implementation-Version) in JSP" New topic
Author

How to get value of Application Build Level (i.e. Implementation-Version) in JSP

Raj Kesavan
Greenhorn

Joined: Oct 08, 2010
Posts: 4
(First post!!)

Hi, I am working on a J2EE web application and I use an ant script to generate APPWAS and DATAWAS ear files to deploy the application to its application and data zones. The application is supposed to display the current build version for the end user on all JSP pages, so it is being inserted into a header jsp file which is part of the site layout, however I am doing this by find-replacing placeholder text in the JSP files using the ant script. Instead of this, I want to save the build label to the Implementation-Version attribute of the ear manifest file, and have a call in the JSP to fetch this value. This would allow the deployed JSP code to stay consistent with its version control copy. I would like to know how to accomplish this.

Implementation details:

Framework: Struts 1.2 on IBM WAS 6.1.
IDE: RAD 7.0

I look forward to hearing your suggestions. Thanks!
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30894
    
158

Raj,
Welcome to JavaRanch!

A recommend storing this data in a static variable upon applications tartup (read from the manifest) and having the JSP just output it.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Raj Kesavan
Greenhorn

Joined: Oct 08, 2010
Posts: 4
I guess this brings up another question for the moment: When I navigate to the web application properties in the WAS admin console, I see a field labeled "Application Build level", anf the value of the "Implementation-Version" attribute in the ear Manifest file is displayed in that field. Is the WAS admin console accessing this value from the manifest file?

If the answer to that question is yes, how do you even access manifest file attributes to begin with?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get value of Application Build Level (i.e. Implementation-Version) in JSP