01: package de.schlund.pfixxml;
02:
03: import java.io.IOException;
04:
05: import javax.servlet.ServletException;
06: import javax.servlet.http.HttpServlet;
07: import javax.servlet.http.HttpServletRequest;
08: import javax.servlet.http.HttpServletResponse;
09:
10: public class JmxPortServlet extends HttpServlet {
11:
12: @Override
13: protected void doGet(HttpServletRequest request,
14: HttpServletResponse response) throws ServletException,
15: IOException {
16: String port = System
17: .getProperty("com.sun.management.jmxremote.port");
18: if (port == null)
19: port = "";
20: response.getOutputStream().print(port);
21: }
22:
23: }
|