Programmatically Determine Connector Port Numbers etc.

J

junk5

Hi

I am writing a custom JSP tag and I need to be able to determine how
the servlet container is configured. Specifically, I want to be able to
do things like get a list of the port numbers in use and which schemes
they are using (e.g. HTTPS on port 8443).

Is this possible?

I know I can manually read my server.xml file or whatever, but I need
the JSP tag to be able to ask the servlet container.

Your advice would be appreciated.

C
 
R

Roedy Green

I am writing a custom JSP tag and I need to be able to determine how
the servlet container is configured. Specifically, I want to be able to
do things like get a list of the port numbers in use and which schemes
they are using (e.g. HTTPS on port 8443).

Is this possible?

Generally that sort of stuff is considered none of your business and
Java does not give you hooks to find it. I take it you have looked.

This leaves you next studying the native API looking for some C++
access to what you want. Then you can build some JNI glue to get what
you want.

See http://mindprod.com/jgloss/jni.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top