• 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Accessing Container Settings from Java

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From a servlet, I need to gather certain information about the container for logging purposes. For example, I need to know the name of the application server I am running in. Also, I'd like to be able to access server settings such as those within the WebSphere Variables environment.

How might I do that?
 
author and cow tipper
Posts: 5001
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, I'd do it in a ServletFilter, that way you can attache the filter to any Servlet you want.

To grab that information, I think you're going to have to get familiar with MBeans, or Management Beans.

Take a look at the Resource Analyzer, or the Tivoli Resource Analyzer, or the IBM Rational Tivoli WebSphere Analyzer, or whatever they call it now. That grabs all of its information by interacting with MBeans. It's probably that type of information you're interested in mining from your application.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic