[mapserver-users] Q: MapServer(ms4w) works with tomcat instead of apache

Zhao Ying (CDU) Ying.Zhao1 at cn.flextronics.com
Wed Jun 4 22:09:42 EDT 2008


 

Hi Mr. Mason,

 

I really appreciate for your reply, now I get to understand about the relationship between Tomcat and Apache.

Well~, frankly, I¡¯ve already had a J2EE web application in progress. The general concept should be like this:

 

--------------------------------------------------------------                                                             -------------- 

Web client (user web brower such as IE¡­) |     -------> (Request to tomcat)  ---------->  |  tomcat  |   (Get and process resources

                                                               |                port :8661                            |              |    according to URL requested

---------------------------------------------------------------                                                             --------------     and return result HTML to client)

 

 

But if I want to add some map features or just a single static web page to show a map within my website, then

There should be one more architecture:

 

 

--------------------------------------------------------------                                                             --------------      Request     -----------------

Web client (user web brower such as IE¡­) |     -------> (Request to apache)  --------->  | apache  |   --------------->  |  MapServer |       

                                                               |                port :8000                            |              |                      |                  |

---------------------------------------------------------------                                                             --------------                      ------------------   

 

 

In another word, our users have to change requesting port number again and again though accessing a same website, for

They actually send requests to a server (software server) ¨C tomcat when requesting dynamic content processed by servlet,

Jsp, whatever, and send requests to another one ¨C apache when requesting map.

 

Sir, according to your email, ¡°But being able to script in Java is still a long way from being able to deploy

to a servlet container like Tomcat.¡± My personal understanding is there¡¯s no way for tomcat to replace apache totally

as a middle man role in terms of cooperating with MapServer. 

 

Does that mean we have to keep two web architectures and have

two software servers installed if we want to provide both dynamic content and map feature? 

 

Or there may be a solution to solve this two-architecture problem?

 

 

Thanks for your great help again!!!

 

Jeff.

>From Chengdu, China

 

________________________________

From: Andrew Mason [mailto:andrew at environ-it.co.uk] 
Sent: 2008Äê6ÔÂ4ÈÕ 23:12
To: Zhao Ying (CDU)
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Q: MapServer(ms4w) works with tomcat instead of apache

 

Hello,

 

Tomcat and Apache are very different things, and while there is certainly a degree of overlap in what Apache Httpd and Apache Tomcat can be used for, the way the two applications actually operate is very different.

Without going in to too much detail here, Tomcat is essentially a J2EE application container, not a webserver and applications are written using the Java programming  language. You'd normally never use Tomcat to serve files in the way you'd use Apache httpd. You'd normally delegate such a task to a webserver. And there really isn't much of an issue about having the two servers installed, we sorted out the port conflict issues a while back.

Excuse any slight errors here, I've only been using Mapserver a few weeks myself, but my understanding is that Mapserver essentially a set of C libraries that are accessible via CGI. You can also access these via  PHP, Python and others even Java it seems, using mapscript. But being able to script in Java is still a long way from being able to deploy to a servlet container like Tomcat.

 

If you really want to avoid installing Apache httpd, then you might find Geoserver useful, as it is a Java web application, and deploying it to Tomcat is really easy.

But I would recommend trying Apache Httpd, as it's not particularly difficult to get to grips with.

 

Hope this helps,

 

regards

 

Andrew Mason

 

 

On 4 Jun 2008, at 10:12, Zhao Ying (CDU) wrote:





Hello,

 

I¡¯m Jeff from Sichuan, China. I have a question about how to configure MapServer so that it could be

able to work with apache-tomcat-5.5.26 instead of apache by default. Since I¡¯ve already had tomcat 5.5.26 

installed on my computer and tomcat is well known as both Web server and application server, 

it seems there¡¯s no need to install one more web server ¨C apache. Furthermore, more web servers, more 

possibilities to conflict, such as listing ports ¡­, right? 

 

Could somebody provide a solution in details on how to achieve this? Thanks!! ~~

 

 

Btw, my computer environment:

Windows XP;

JDK 1.4;

apache-tomcat-5.5.26; installed on c:\ apache-tomcat-5.5.26

ms4w_2.2.7.zip downloaded from http://maptools.org/ms4w/ and unzipped to c:\ms4w

 

 

Regards,

Jeff.

 

Legal Disclaimer: The information contained in this message may be privileged and confidential. It is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message

_______________________________________________

mapserver-users mailing list

mapserver-users at lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/mapserver-users

 


Legal Disclaimer:
The information contained in this message may be privileged and confidential. It is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080605/cab8accb/attachment-0001.html


More information about the mapserver-users mailing list