You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Craig R. McClanahan" <cr...@apache.org> on 2001/11/03 01:18:27 UTC
Tomcat Administration Webapp - HTML Prototype Available
Some of the user interface folks at Sun were kind enough to build a mockup
of what an Administration Webapp for Tomcat 4 might look like. You can
see the mockup for yourself at:
http://jakarta.apache.org/~craigmcc/TomcatAdminPrototype/
Please take a look and provide feedback to TOMCAT-DEV to guide the
development of this application.
A couple of notes:
* The mockup uses a fancy JavaScript implementation of a tree control
in the left frame. We would probably want to use something that
wasn't so browser-dependent in the real application.
* None of the "Available Actions" options actually do anything -
this is just a model to give people a feel for how navigation
would work.
Craig McClanahan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat Administration Webapp - HTML Prototype Available
Posted by Remy Maucherat <rm...@home.com>.
> Some of the user interface folks at Sun were kind enough to build a mockup
> of what an Administration Webapp for Tomcat 4 might look like. You can
> see the mockup for yourself at:
>
> http://jakarta.apache.org/~craigmcc/TomcatAdminPrototype/
>
> Please take a look and provide feedback to TOMCAT-DEV to guide the
> development of this application.
>
> A couple of notes:
>
> * The mockup uses a fancy JavaScript implementation of a tree control
> in the left frame. We would probably want to use something that
> wasn't so browser-dependent in the real application.
>
> * None of the "Available Actions" options actually do anything -
> this is just a model to give people a feel for how navigation
> would work.
It's cool, but my Moz doesn't like it too much (big surprise). No fancy
separators in the tables, and I can fold back the "folders" either.
The banner at the top could use some improvement (colors + buttons).
Remy
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Tomcat Administration Webapp - HTML Prototype Available
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Fri, 2 Nov 2001, Ben Sifuentes wrote:
> Date: Fri, 2 Nov 2001 22:00:23 -0500
> From: Ben Sifuentes <be...@intechpro.com>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: Tomcat Developers List <to...@jakarta.apache.org>
> Subject: RE: Tomcat Administration Webapp - HTML Prototype Available
>
> I looked at the mocked up admin tool and didn't see anything for setting up
> virtual hosts
> configurations.
This would be done by an "Add Host" option under the "Service" node's
actions, which (as you note) is missing in the prototype. It would have
the effect of adding another <Host> node into the server.xml file, which
is how you add virtual hosts today.
>
> -Ben
>
Craig
> -----Original Message-----
> From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
> R. McClanahan
> Sent: Friday, November 02, 2001 7:18 PM
> To: tomcat-dev@jakarta.apache.org
> Subject: Tomcat Administration Webapp - HTML Prototype Available
>
>
> Some of the user interface folks at Sun were kind enough to build a mockup
> of what an Administration Webapp for Tomcat 4 might look like. You can
> see the mockup for yourself at:
>
> http://jakarta.apache.org/~craigmcc/TomcatAdminPrototype/
>
> Please take a look and provide feedback to TOMCAT-DEV to guide the
> development of this application.
>
> A couple of notes:
>
> * The mockup uses a fancy JavaScript implementation of a tree control
> in the left frame. We would probably want to use something that
> wasn't so browser-dependent in the real application.
>
> * None of the "Available Actions" options actually do anything -
> this is just a model to give people a feel for how navigation
> would work.
>
> Craig McClanahan
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat Administration Webapp - HTML Prototype Available
Posted by Pier Fumagalli <pi...@betaversion.org>.
Craig R. McClanahan at craigmcc@apache.org wrote:
> Isn't this really an issue of Catalina's internal architecture (which the
> admin tool simply tries to reflect) rather than an issue for the tool
> itself? Or, are you suggesting that the tool should present a different
> view?
Nope. Sorry, but the tool made it clearer in my mind (dunno why, but my
brain works in strange ways)... The tool is fine, my point is that the
"virtual host" issue is a problem of the current Catalina "architecture"
(not even the architecture, that is perfectly fine, but how the components
are organized, and how a request is mapped). The only "real" bug is in the
HTTP 1.1 connector (which should respond with a 400 to requests without a
Host: header)...
Pier
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat Administration Webapp - HTML Prototype Available
Posted by "Craig R. McClanahan" <cr...@apache.org>.
Isn't this really an issue of Catalina's internal architecture (which the
admin tool simply tries to reflect) rather than an issue for the tool
itself? Or, are you suggesting that the tool should present a different
view?
Craig
On Sat, 3 Nov 2001, Pier Fumagalli wrote:
> Date: Sat, 03 Nov 2001 04:16:17 +0000
> From: Pier Fumagalli <pi...@betaversion.org>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: Tomcat Developers List <to...@jakarta.apache.org>
> Subject: Re: Tomcat Administration Webapp - HTML Prototype Available
>
> Ben Sifuentes at ben.sifuentes@intechpro.com wrote:
>
> > I looked at the mocked up admin tool and didn't see anything for setting up
> > virtual hosts configurations.
>
> Yeah, it's not _that_ easy to find out... Click and select "Service" on the
> left, and then there's a drop-down combo on the right with "Actions"... It's
> in there...
>
> But IMO, all that part is wrong because a virtual host is (should) be
> defined as the merger of "host" and "port", which currently all web servers
> support, but TC40... The selection of the virtual host should be made
> (according to RFC-2616), on this dual selector, section 14.23 says:
>
> The Host request-header field specifies the Internet host and port
> number of the resource being requested [...] This allows the origin
> server or gateway to differentiate between internally-ambiguous URLs,
> such as the root "/" URL of a server for multiple host names on a
> single IP address.
>
> Host = "Host" ":" host [ ":" port ] ; Section 3.2.2
>
> A "host" without any trailing port information implies the default
> port for the service requested (e.g., "80" for an HTTP URL). [...]
>
> A client MUST include a Host header field in all HTTP/1.1 request
> messages . If the requested URI does not include an Internet host
> name for the service being requested, then the Host header field
> MUST be given with an empty value. [...]
>
> All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad
> Request) status code to any HTTP/1.1 request message which lacks a
> Host header field. [...]
>
> So, how do I read it? Host MUST be there in HTTP, Host represents the
> virtual server, Host is made up of name:port, and if port is not there, it
> is defaulted to 80.
>
> The selection of the virtual host, then MUST be done in terms of the joint
> value "host:port", and this is not present in Catalina, as the selection is
> made only in terms of the first value, the host name, completely
> disregarding the port value, unless, of course, you don't start ANOTHER
> <Service> with another <Connector> and blablabla (you know where I'm ending
> up to, don't you?)...
>
> So, the current implementation is (IMO) not conformant to the HTTP spec, and
> to just be more clear, try presenting Catalina with an HTTP request not
> containing the header:
>
> # telnet localhost 8080
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> >> GET / HTTP/1.1
> >>
> << HTTP/1.1 302 Moved Temporarily
> << Content-Type: text/html
> << Date: Sat, 03 Nov 2001 03:44:36 GMT
> << Location: http://nagoya.apache.org:8080/index.html
> << Transfer-Encoding: chunked
> << Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)
> [...]
>
> Plain wrong.. The response is not 400, but 302. Look if I do the same under
> Apache:
>
> # telnet localhost 80
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> >> GET / HTTP/1.1
> >>
> << HTTP/1.1 400 Bad Request
> << Date: Sat, 03 Nov 2001 03:44:57 GMT
> << Server: Apache/1.3.20 (Unix)
> << Connection: close
> << Transfer-Encoding: chunked
> << Content-Type: text/html; charset=iso-8859-1
> [...]
>
> Well, this one looks _way_ better...
>
> Of course, we could add that in Catalina, and make it compliant, but when it
> comes down to virtual host selection, if I want to differentiate between two
> servers, I would always have to have two different <Service> clusters in my
> server.xml...
>
> But here comes another problem... Let's say that a proxy is absolutely sure
> that a resource under "server:8080" can be accessed thru "server:80", we're
> perfectly confident about this. A simple proxy implementation could then
> reroute all requests he gets for "server" on port 8080 to "server" on port
> 80... Nowhere in the HTTP RFC is said that I cannot do it.
>
> So, my "access" to the resource, is different from the usual way, but the
> selector in this case "server:8080" is still valid, I should find that
> resource there... (I'm thinking about a weird firewall setup, OK?) Now, the
> guy on "server", decides to swap from Apache to Tomcat, gets on with his
> life, configures two different <Service> with two different <Connnector> and
> forgets to notify the proxy folk... Now, all my requests for "server:8080"
> will be incorrectly redirected to "server:80", because the way in which
> Catalina processes virtual hosts is wrong...
>
> It might sound purely academic, now, but when you start facing the problem
> of decoupling the connector to the container (such as using Apache with a
> module), kids, things are starting to hurt... All web servers behave in a
> way, the selector is "server:port", but Catalina... Something flaky.
>
> In fact, if you go back in the logs and see my very first implementation of
> "WarpHost", the very first thing I added was the "port" selector, which then
> looked like a hack, and so got removed. But then all other sorts of
> wierdness happened, and to solve this problem I believe that the only
> solution is completely decoupling the virtual-host selection process from
> the web-application selection process: Something like:
>
> <Service ...>
> <Protocol>
> <Connector ... port="80"/>
> <Connector ... Port="8080"/>
>
> <Host name="test:80">
> <Context reference="myContextA"/>
> <Context reference="myContextB"/>
> </Host>
> <Host name="test:8080">
> ....
> </Host>
> </Protocol>
>
> <Engine>
> <Realm .../>
> <Logger .../>
> <Context path="/example" docBase="example.war" reference="myContextA"/>
> </Engine>
> ...
> </Service>
>
> And so on... In cases where the HTTP protocol stack is completely separated
> (read Apache), the <Service> configuration would be trivial, because all the
> first part <Protocol> is _already_present_ in the web-server itself, I would
> just have to put in my httpd.conf something that will tell the web server to
> use that particular reference... Such as:
>
> WebAppUse myContextA myConnection
>
> If we're using mod_webapp. Depending in which "virtualhost" that is put, it
> means that that web application is there, and the other directive
> "WebAppDeploy" would be used only for "on-the-fly" deployment of contexts
> (as right now does, but it's all crummed up...)...
>
> Sorry for the long email, but it's three months I'm pondering about this in
> my solitary confinment here in London, and I see something wrong... As I
> started saying last week on tomcat-user, I'm just going to remove the
> concept of host from the WARP classes, and allow deployment up one level...
> In the <Engine>...
>
> (gee, that was three pages :) :) :)
>
> Pier
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat Administration Webapp - HTML Prototype Available
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Wed, 7 Nov 2001, Pier Fumagalli wrote:
> Date: Wed, 07 Nov 2001 21:05:38 +0000
> From: Pier Fumagalli <pi...@betaversion.org>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: Tomcat Developers List <to...@jakarta.apache.org>
> Subject: Re: Tomcat Administration Webapp - HTML Prototype Available
>
> Craig R. McClanahan at craigmcc@apache.org wrote:
>
> >> Plain wrong.. The response is not 400, but 302.
> >
> > It's a 302 because you have the "defaultHost" attribute set on the
> > <Engine> element, which tells Tomcat to assume the host if it's not
> > specified. So it's just doing the usual redirect to the welcome page.
> >
> > You can configure a similar-but-different capability with Apache's
> > ServerPath directive; it's just not on by default.
>
> So, I can configure the HTTP connector to be compliant with the HTTP spec...
> Cool, I thought I didn't have to do that, but it would have been compliant
> from scratch....
>
It's certainly feasible to turn "defaultHost" off by default (and break
three year's worth of *user* backwards compatibility expectations along
the way :-). The cost would be that, out-of-the-box, you could only talk
to Tomcat from a browser running on the same machine as the server -- a
decided reduction in usability.
Also, the HTTP/1.1 spec specifically *allows* heuristics to select the
host on HTTP/1.0 requests that do not include a "Host" header (last
paragraph of 5.2), so it's perfectly legal to deal with the "telnet
localhost 8080" case where you type:
GET /foo HTTP/1.0
The spec requires an error 400 on an HTTP/1.1 request that does not
include a "Host" header. It doesn't look like we are enforcing this yet,
so I'll do that in a sec ... but I will remind you the same thing I remind
lots of people on TOMCAT-USER: you'll get lots faster turnaround on bug
reports if you submit them to our bug tracking system at:
http://nagoya.apache.org/bugzilla/
:-)
> >> Of course, we could add that in Catalina, and make it compliant, but when it
> >> comes down to virtual host selection, if I want to differentiate between two
> >> servers, I would always have to have two different <Service> clusters in my
> >> server.xml...
> >
> > Remove the "defaultHost" attribute from the <Engine> element and you will
> > get an error on this. It's a 500 rather than a 400 (IMHO that's more
> > accurate, but it isn't the important issue).
>
> Quoting the spec again:
>
> All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad
> Request) status code to any HTTP/1.1 request message which lacks a
> Host header field. [...]
>
> Bummer, we're not compliant now.
>
We are now.
> >> It might sound purely academic, now, but when you start facing the problem
> >> of decoupling the connector to the container (such as using Apache with a
> >> module), kids, things are starting to hurt... All web servers behave in a
> >> way, the selector is "server:port", but Catalina... Something flaky.
> >
> > See above,
>
> See my reply...
>
> > but note a couple of additional points:
> >
> > * Cookies are not sensitive to port numbers - only to host names.
> > Therefore, by your definition, they are broken as well.
>
> ???? You _sure_ about it? Because AFAICS from RFC-2965, a cookie CAN be
> associated with a particular hostname/domain (depending on the scope you
> want to give to your cookie), and with a PORT value...
>
> Yeah, it's lacking in the "Netscape" version of cookies, but I believe that
> most recent browsers can deal with RFC-2965 cookies...
>
The servlet spec references RFC 2109 for cookies, not RFC 2965 (which
supports "port" as an option). It also appears that 2965 is described as
"Proposed Standard", and is still in that state as of RFC 3000 (November
2001).
>
> > * In particular, it must be possible for SSL and non-SSL ports to
> > share the same webapps. For Tomcat standalone with the default
> > ports (8080 and 8443), the following URLs should resolve to exactly
> > the same webapp -- including the same sessions:
> >
> > http://localhost:8080/index.html
> >
> > http://localhost:8443/index.html
> >
> > The current implementation for Tomcat standalone has this property. Be
> > sure that it does with the web connectors as well, or you basically make
> > it impossible for webapps to have some requests non-SSL and some requests
> > SSL (such as a shopping cart).
>
> Sure, you can share the same web application between two virtual hosts,
> given that the same context is mounted under the same path (because the path
> is associated with the context itself)... I don't see how that would clash
> with the servlet specification...
>
> I can have http://localhost:80/index.html, https://localhost:443/index.html
> both associated with context "A", and http://localhost:8080/index.html,
> https://localhost:8443/index.html with context "B"... It's just a matter of
> defining what is your concept of virtual host... And IMO the HTTP concept of
> virtual host is very (very) well defined...
>
> Simply TC40's HTTP connector is not "compliant" with it...
>
> Pier
>
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat Administration Webapp - HTML Prototype Available
Posted by Pier Fumagalli <pi...@betaversion.org>.
Craig R. McClanahan at craigmcc@apache.org wrote:
>> Plain wrong.. The response is not 400, but 302.
>
> It's a 302 because you have the "defaultHost" attribute set on the
> <Engine> element, which tells Tomcat to assume the host if it's not
> specified. So it's just doing the usual redirect to the welcome page.
>
> You can configure a similar-but-different capability with Apache's
> ServerPath directive; it's just not on by default.
So, I can configure the HTTP connector to be compliant with the HTTP spec...
Cool, I thought I didn't have to do that, but it would have been compliant
from scratch....
>> Of course, we could add that in Catalina, and make it compliant, but when it
>> comes down to virtual host selection, if I want to differentiate between two
>> servers, I would always have to have two different <Service> clusters in my
>> server.xml...
>
> Remove the "defaultHost" attribute from the <Engine> element and you will
> get an error on this. It's a 500 rather than a 400 (IMHO that's more
> accurate, but it isn't the important issue).
Quoting the spec again:
All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad
Request) status code to any HTTP/1.1 request message which lacks a
Host header field. [...]
Bummer, we're not compliant now.
>> It might sound purely academic, now, but when you start facing the problem
>> of decoupling the connector to the container (such as using Apache with a
>> module), kids, things are starting to hurt... All web servers behave in a
>> way, the selector is "server:port", but Catalina... Something flaky.
>
> See above,
See my reply...
> but note a couple of additional points:
>
> * Cookies are not sensitive to port numbers - only to host names.
> Therefore, by your definition, they are broken as well.
???? You _sure_ about it? Because AFAICS from RFC-2965, a cookie CAN be
associated with a particular hostname/domain (depending on the scope you
want to give to your cookie), and with a PORT value...
Yeah, it's lacking in the "Netscape" version of cookies, but I believe that
most recent browsers can deal with RFC-2965 cookies...
> * In particular, it must be possible for SSL and non-SSL ports to
> share the same webapps. For Tomcat standalone with the default
> ports (8080 and 8443), the following URLs should resolve to exactly
> the same webapp -- including the same sessions:
>
> http://localhost:8080/index.html
>
> http://localhost:8443/index.html
>
> The current implementation for Tomcat standalone has this property. Be
> sure that it does with the web connectors as well, or you basically make
> it impossible for webapps to have some requests non-SSL and some requests
> SSL (such as a shopping cart).
Sure, you can share the same web application between two virtual hosts,
given that the same context is mounted under the same path (because the path
is associated with the context itself)... I don't see how that would clash
with the servlet specification...
I can have http://localhost:80/index.html, https://localhost:443/index.html
both associated with context "A", and http://localhost:8080/index.html,
https://localhost:8443/index.html with context "B"... It's just a matter of
defining what is your concept of virtual host... And IMO the HTTP concept of
virtual host is very (very) well defined...
Simply TC40's HTTP connector is not "compliant" with it...
Pier
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat Administration Webapp - HTML Prototype Available
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Sat, 3 Nov 2001, Pier Fumagalli wrote:
> [snip]
> # telnet localhost 8080
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> >> GET / HTTP/1.1
> >>
> << HTTP/1.1 302 Moved Temporarily
> << Content-Type: text/html
> << Date: Sat, 03 Nov 2001 03:44:36 GMT
> << Location: http://nagoya.apache.org:8080/index.html
> << Transfer-Encoding: chunked
> << Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)
> [...]
>
> Plain wrong.. The response is not 400, but 302.
It's a 302 because you have the "defaultHost" attribute set on the
<Engine> element, which tells Tomcat to assume the host if it's not
specified. So it's just doing the usual redirect to the welcome page.
You can configure a similar-but-different capability with Apache's
ServerPath directive; it's just not on by default.
> Look if I do the same under
> Apache:
>
> # telnet localhost 80
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> >> GET / HTTP/1.1
> >>
> << HTTP/1.1 400 Bad Request
> << Date: Sat, 03 Nov 2001 03:44:57 GMT
> << Server: Apache/1.3.20 (Unix)
> << Connection: close
> << Transfer-Encoding: chunked
> << Content-Type: text/html; charset=iso-8859-1
> [...]
>
> Well, this one looks _way_ better...
>
> Of course, we could add that in Catalina, and make it compliant, but when it
> comes down to virtual host selection, if I want to differentiate between two
> servers, I would always have to have two different <Service> clusters in my
> server.xml...
>
Remove the "defaultHost" attribute from the <Engine> element and you will
get an error on this. It's a 500 rather than a 400 (IMHO that's more
accurate, but it isn't the important issue).
> But here comes another problem... Let's say that a proxy is absolutely sure
> that a resource under "server:8080" can be accessed thru "server:80", we're
> perfectly confident about this. A simple proxy implementation could then
> reroute all requests he gets for "server" on port 8080 to "server" on port
> 80... Nowhere in the HTTP RFC is said that I cannot do it.
>
> So, my "access" to the resource, is different from the usual way, but the
> selector in this case "server:8080" is still valid, I should find that
> resource there... (I'm thinking about a weird firewall setup, OK?) Now, the
> guy on "server", decides to swap from Apache to Tomcat, gets on with his
> life, configures two different <Service> with two different <Connnector> and
> forgets to notify the proxy folk... Now, all my requests for "server:8080"
> will be incorrectly redirected to "server:80", because the way in which
> Catalina processes virtual hosts is wrong...
>
> It might sound purely academic, now, but when you start facing the problem
> of decoupling the connector to the container (such as using Apache with a
> module), kids, things are starting to hurt... All web servers behave in a
> way, the selector is "server:port", but Catalina... Something flaky.
>
See above, but note a couple of additional points:
* Cookies are not sensitive to port numbers - only to host names.
Therefore, by your definition, they are broken as well.
* In particular, it must be possible for SSL and non-SSL ports to
share the same webapps. For Tomcat standalone with the default
ports (8080 and 8443), the following URLs should resolve to exactly
the same webapp -- including the same sessions:
http://localhost:8080/index.html
http://localhost:8443/index.html
The current implementation for Tomcat standalone has this property. Be
sure that it does with the web connectors as well, or you basically make
it impossible for webapps to have some requests non-SSL and some requests
SSL (such as a shopping cart).
>
> Pier
>
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat Administration Webapp - HTML Prototype Available
Posted by Pier Fumagalli <pi...@betaversion.org>.
Ben Sifuentes at ben.sifuentes@intechpro.com wrote:
> I looked at the mocked up admin tool and didn't see anything for setting up
> virtual hosts configurations.
Yeah, it's not _that_ easy to find out... Click and select "Service" on the
left, and then there's a drop-down combo on the right with "Actions"... It's
in there...
But IMO, all that part is wrong because a virtual host is (should) be
defined as the merger of "host" and "port", which currently all web servers
support, but TC40... The selection of the virtual host should be made
(according to RFC-2616), on this dual selector, section 14.23 says:
The Host request-header field specifies the Internet host and port
number of the resource being requested [...] This allows the origin
server or gateway to differentiate between internally-ambiguous URLs,
such as the root "/" URL of a server for multiple host names on a
single IP address.
Host = "Host" ":" host [ ":" port ] ; Section 3.2.2
A "host" without any trailing port information implies the default
port for the service requested (e.g., "80" for an HTTP URL). [...]
A client MUST include a Host header field in all HTTP/1.1 request
messages . If the requested URI does not include an Internet host
name for the service being requested, then the Host header field
MUST be given with an empty value. [...]
All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad
Request) status code to any HTTP/1.1 request message which lacks a
Host header field. [...]
So, how do I read it? Host MUST be there in HTTP, Host represents the
virtual server, Host is made up of name:port, and if port is not there, it
is defaulted to 80.
The selection of the virtual host, then MUST be done in terms of the joint
value "host:port", and this is not present in Catalina, as the selection is
made only in terms of the first value, the host name, completely
disregarding the port value, unless, of course, you don't start ANOTHER
<Service> with another <Connector> and blablabla (you know where I'm ending
up to, don't you?)...
So, the current implementation is (IMO) not conformant to the HTTP spec, and
to just be more clear, try presenting Catalina with an HTTP request not
containing the header:
# telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
>> GET / HTTP/1.1
>>
<< HTTP/1.1 302 Moved Temporarily
<< Content-Type: text/html
<< Date: Sat, 03 Nov 2001 03:44:36 GMT
<< Location: http://nagoya.apache.org:8080/index.html
<< Transfer-Encoding: chunked
<< Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)
[...]
Plain wrong.. The response is not 400, but 302. Look if I do the same under
Apache:
# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
>> GET / HTTP/1.1
>>
<< HTTP/1.1 400 Bad Request
<< Date: Sat, 03 Nov 2001 03:44:57 GMT
<< Server: Apache/1.3.20 (Unix)
<< Connection: close
<< Transfer-Encoding: chunked
<< Content-Type: text/html; charset=iso-8859-1
[...]
Well, this one looks _way_ better...
Of course, we could add that in Catalina, and make it compliant, but when it
comes down to virtual host selection, if I want to differentiate between two
servers, I would always have to have two different <Service> clusters in my
server.xml...
But here comes another problem... Let's say that a proxy is absolutely sure
that a resource under "server:8080" can be accessed thru "server:80", we're
perfectly confident about this. A simple proxy implementation could then
reroute all requests he gets for "server" on port 8080 to "server" on port
80... Nowhere in the HTTP RFC is said that I cannot do it.
So, my "access" to the resource, is different from the usual way, but the
selector in this case "server:8080" is still valid, I should find that
resource there... (I'm thinking about a weird firewall setup, OK?) Now, the
guy on "server", decides to swap from Apache to Tomcat, gets on with his
life, configures two different <Service> with two different <Connnector> and
forgets to notify the proxy folk... Now, all my requests for "server:8080"
will be incorrectly redirected to "server:80", because the way in which
Catalina processes virtual hosts is wrong...
It might sound purely academic, now, but when you start facing the problem
of decoupling the connector to the container (such as using Apache with a
module), kids, things are starting to hurt... All web servers behave in a
way, the selector is "server:port", but Catalina... Something flaky.
In fact, if you go back in the logs and see my very first implementation of
"WarpHost", the very first thing I added was the "port" selector, which then
looked like a hack, and so got removed. But then all other sorts of
wierdness happened, and to solve this problem I believe that the only
solution is completely decoupling the virtual-host selection process from
the web-application selection process: Something like:
<Service ...>
<Protocol>
<Connector ... port="80"/>
<Connector ... Port="8080"/>
<Host name="test:80">
<Context reference="myContextA"/>
<Context reference="myContextB"/>
</Host>
<Host name="test:8080">
....
</Host>
</Protocol>
<Engine>
<Realm .../>
<Logger .../>
<Context path="/example" docBase="example.war" reference="myContextA"/>
</Engine>
...
</Service>
And so on... In cases where the HTTP protocol stack is completely separated
(read Apache), the <Service> configuration would be trivial, because all the
first part <Protocol> is _already_present_ in the web-server itself, I would
just have to put in my httpd.conf something that will tell the web server to
use that particular reference... Such as:
WebAppUse myContextA myConnection
If we're using mod_webapp. Depending in which "virtualhost" that is put, it
means that that web application is there, and the other directive
"WebAppDeploy" would be used only for "on-the-fly" deployment of contexts
(as right now does, but it's all crummed up...)...
Sorry for the long email, but it's three months I'm pondering about this in
my solitary confinment here in London, and I see something wrong... As I
started saying last week on tomcat-user, I'm just going to remove the
concept of host from the WARP classes, and allow deployment up one level...
In the <Engine>...
(gee, that was three pages :) :) :)
Pier
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Tomcat Administration Webapp - HTML Prototype Available
Posted by Ben Sifuentes <be...@intechpro.com>.
I looked at the mocked up admin tool and didn't see anything for setting up
virtual hosts
configurations.
-Ben
-----Original Message-----
From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
R. McClanahan
Sent: Friday, November 02, 2001 7:18 PM
To: tomcat-dev@jakarta.apache.org
Subject: Tomcat Administration Webapp - HTML Prototype Available
Some of the user interface folks at Sun were kind enough to build a mockup
of what an Administration Webapp for Tomcat 4 might look like. You can
see the mockup for yourself at:
http://jakarta.apache.org/~craigmcc/TomcatAdminPrototype/
Please take a look and provide feedback to TOMCAT-DEV to guide the
development of this application.
A couple of notes:
* The mockup uses a fancy JavaScript implementation of a tree control
in the left frame. We would probably want to use something that
wasn't so browser-dependent in the real application.
* None of the "Available Actions" options actually do anything -
this is just a model to give people a feel for how navigation
would work.
Craig McClanahan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat Administration Webapp - HTML Prototype Available
Posted by Pier Fumagalli <pi...@betaversion.org>.
Craig R. McClanahan at craigmcc@apache.org wrote:
> Some of the user interface folks at Sun were kind enough to build a mockup
> of what an Administration Webapp for Tomcat 4 might look like. You can
> see the mockup for yourself at:
>
> http://jakarta.apache.org/~craigmcc/TomcatAdminPrototype/
>
> Please take a look and provide feedback to TOMCAT-DEV to guide the
> development of this application.
If you can remove that "pink" on top, I would be grateful, and on the
overall, it doesn't render "that" great on OS/X. I would suggest living
buttons and clickables up to their native representation, since they look
better in every different environment (unless you don't want to really style
up things right)... One more thing on the aesthetic side, is that
"cracquelure" background (soooo PhotoShop), I would prefer it plain...
I hope all HTML is not "hard coded" so that someone (who's not an engineer,
but has some aesthetic taste) could tweak them (like, the menu on the left
looks really like an applet.. But it's javascript...)...
Functionality wise, AFAICS, it's good... Just make sure not to be tied to
the "default" idea of having Server/Service/Host/Context, because the more I
think about it, the more it's flood...
IMO the "Host" part, should be delegated to the connector, because it's
really there (in HTTP) where it resides...
The separation should be made in two levels: A container of contexts,
containing all the set of the deployed applications, and at the connector
level, you simply "mount" that application under a specific virtual host...
I'm integrating this concept in the WebApp module, and in all those
situations where the HTTP connector is decoupled from the container itself,
that's absolutely a must... So, even tomcat, at the end should behave in
that way.
Tomcat is a web application container, good, how those applications are seen
from HTTP should be delegated to the connector (since tomorrow servlets
might not only be HTTP, but also SIP... See JSR-116).
Pier
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tomcat Administration Webapp - HTML Prototype Available
Posted by Jon Stevens <jo...@latchkey.com>.
on 11/2/01 4:18 PM, "Craig R. McClanahan" <cr...@apache.org> wrote:
> Some of the user interface folks at Sun were kind enough to build a mockup
> of what an Administration Webapp for Tomcat 4 might look like. You can
> see the mockup for yourself at:
>
> http://jakarta.apache.org/~craigmcc/TomcatAdminPrototype/
>
> Please take a look and provide feedback to TOMCAT-DEV to guide the
> development of this application.
>
> A couple of notes:
>
> * The mockup uses a fancy JavaScript implementation of a tree control
> in the left frame. We would probably want to use something that
> wasn't so browser-dependent in the real application.
>
> * None of the "Available Actions" options actually do anything -
> this is just a model to give people a feel for how navigation
> would work.
>
> Craig McClanahan
It looks really bad on MacOS9 IE 5.0
-jon
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>