Cummins College wrote:
Hi,
I know the problem is slightly different but we want to access the
server.xml for the http connector so that we can set its secure attribute
depending on the protocol to be used is http or https.
This has to done at runtime i.e without shutting down tomcat and re-starting
it. Is it possible to access the http connector at runtime and change its
attributes?
I believe that what people here do not understand, is *why* you would
need to do that. It does not seem to make a lot of sense, on the face
of it, and maybe there is another much simpler way to achieve what you
really want to achieve.
So can you tell us which would be *the purpose* of changing the
characteristics of the Connector on-the-fly ?
Let me give you an example, to explain why it is difficult for us to
grasp your need :
- suppose a browser starts a session with your server, with a URL like
"http://yourserver.yourcompany.com"
- it gets a page back from the server. This page contains links to
further pages on your site, like
<a href="/anotherpage.html">documentation</a>
- when clicking on that link, the browser is going to interpret this as
the full URL :
"http://yourserver.yourcompany.com/anotherpage.html"
- but if in the meantime, you would have changed the port 80 Connector
to require HTTPS (assuming this is even possible, which I don't think it
is), the browser would get an error, because it is still trying HTTP, as
the link says.
That kind of thing is what does not seem to make sense.
It is not because you would be changing the Connector on the server
side, that all pages which you have already sent to browsers are
magically, through some action-at-a-distance, going to change their links.
(or if you manage to do that, then tell us how, because that would be a
real breakthrough)
On the other hand, you can have two Connectors for the same website, one
for HTTP and one for HTTPS, active at the same time, on different ports.
Switching the client to use the one or the other is then just done by
returning to the client different html documents, containing links to
the port (and protocol) you want them to use next.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org