LoginSignup
0
0

More than 5 years have passed since last update.

Tomcat7でserverステータス(xml)をパースしようとしたらエラーになった件

Last updated at Posted at 2015-02-25

tomcat6から7にアップデートしたときに、serverステータス取得API

http://{host}:{port}/manager/status?XML=true

から取得したをxmlパースする処理がエラーになったのでそのメモ。

結論から言うと、connectorの名前が変わっている(bioが付いている)、かつなぜかダブルクォーテーションが入ってます。

名前が変わってるのは許容できるとして、何でダブルクォーテを入れたw

tomcat6

<connector name='http-8080'>
    <threadInfo  maxThreads="600" currentThreadCount="10" ... />
    <requestInfo  maxTime="872" processingTime="1783" ... />
    <workers>
        ...
    </workers>
</connector>

tomcat7

<connector name='"http-bio-8080"'>
    <threadInfo  maxThreads="600" currentThreadCount="10" ... />
    <requestInfo  maxTime="872" processingTime="1783" ... />
    <workers>
        ...
    </workers>
</connector>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0