Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Raj Kesavan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(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
Posts: 34681
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Raj Kesavan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic