• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic