tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: HyperLink Office connection
Date Thu, 10 Jun 2010 17:36:08 GMT

I am glad that you found a solution that works for you, and maybe the 
most important at this point is that it quickly solves your problem.

About the solution below however, I want to point out that it is rather 
"expensive" in many respects, and I hope that this is not supposed to be 
a high-volume server.
What is happening in your schema is :
- Word requests a page by sending a HTTP request to the server 
(directly, or going through some IE functionality)
- the server gets the request
- the server starts a new separate perl interpreter process
- the perl interpreter compiles your script
- the perl interpreter runs your script, producing the initial html 
response, and exits
- Apache reads the response from perl and sends it to the browser
- the browser (or Word) receives the html page
- the browser (or Word) interprets the refresh header, and makes a new 
request to the server
- the server now processes what should have been the original request

I am a fan of Apache and perl myself, but you may want to revise this a 
bit if this is supposed to handle many clients.

antonio giulio wrote:
> Hi Andre',
> thanks for the offer, you are right, at this point is off-topic,
> anyway I solved (sorry for the OT) all in Apache-httpd:
> on the virtual host configuration:
> RewriteEngine on
> ReWriteCond %{SERVER_PORT} !^443$
> RewriteRule (.*)  https://%{HTTP_HOST}/cgi-bin/$1
> and the simple in the cgi-bin/ is:
> #!/usr/bin/perl
> $uri = $ENV{'REQUEST_URI'};
> $context = substr $uri, 27;
> $url = "https://$ENV{'HTTP_HOST'}$context";
> print "Content-type:text/html\r\n\r\n";
> print "<html>";
> print "<head>";
> print "<meta http-equiv=\"refresh\" content=\"0;url=$url\" />";
> print "</head>";
> print "<body>";
> print "</body>";
> print "</html>";
> 1;
> basically the address:
> is redirect from the RewriteRule to:
> and the just retrieve rest_of_the_url string and compose
> the new string.
> The html returned has:
> <meta http-equiv=\"refresh\" content=\"0;url=$url\" />
> meta-refresh sends back to Office/Word 200, and this time Office can
> open correctly the browser returned in the <meta />
> Thanks,
> Julio
> On 10 June 2010 11:52, André Warnier <> wrote:
>> antonio giulio wrote:
>>>> N.B.  If Office is handling the connection requests up to some step,
>>>> then Tomcat can't do anything about it - the problem is occuring before
>>>> Tomcat has any influence over the situation.
>>> Yes, Unfortunely I think you are right. A solution maybe could be
>>> writing a CGI for Apache and redirect there the connection and change
>>> HTTP-headers to communicate with Office.
>> Julio,
>> I also believe that this is a bit off-topic for this list.
>> But what you are trying to do does not seem very exotic, and I am interested
>> in the topic, and I think that I can help you.
>> So if you want to continue this discussion off-list, send me an email
>> directly.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message