[mapserver-users] Create a WMS service in J2EE based on mapserver

Andrea Peri aperi2007 at gmail.com
Mon Jul 22 14:59:06 PDT 2013


You should create a webapp empty with a web.xml on a WEB-INF folder as
usual.
After this you

in the WEB-INF you create a cgi folder and refer it in the webxml.

name it as example:

"WEB-INF/cgi-folder-for-mapserver"

copy in it the executable "mapserv"

in the web.xml put something like this:


  <servlet>
    <servlet-name>cgi-mapserver</servlet-name>
    <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>cgiPathPrefix</param-name>
      <param-value>WEB-INF/cgi-folder-for-mapserver</param-value>
    </init-param>
    <init-param>
      <param-name>executable</param-name>
      <param-value></param-value>
    </init-param>
    <init-param>
      <param-name>passShellEnvironment</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>5</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>cgi-mapserver</servlet-name>
    <url-pattern>/cgi-or-whatyou-want</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>cgi-mapserver</servlet-name>
    <url-pattern>/cgi-or-whatyou-want/*</url-pattern>
  </servlet-mapping>

Pay attention to the passShellEnvironment set to true otherwise the
mapserver don't see the environments variables.

The same configuration more or less work for
tinyows (we use also it usually with tomcat )
and for qgis-server (we use it also)

Regards

Andrea Peri



2013/7/19 maven apache <apachemaven0 at gmail.com>

> Hi Andrea Peri:
>
> Can you give me more details about how to setup the environment?
>
> I have read the documents, but I have not find too many about J2EE.
>
>
> 2013/7/19 Andrea Peri <aperi2007 at gmail.com>
>
>> Surely yes.
>>
>> We are using a mapserver with a tomcat environment.
>> You must set the servlet-cgi.
>>
>> We use it without the fastcgi option.
>>
>>
>>
>>
>> 2013/7/19 maven apache <apachemaven0 at gmail.com>
>>
>>> Hi:
>>>
>>> I am trying to create a OGC WMS service using the J2EE, however we can
>>> not use something like GeoServer since it use the SLD to render the map
>>> while we use ESRI ArcGIS to render the map. Then we have the mxd file.
>>>
>>> Then I post a question at gis.stackexchange.com<http://gis.stackexchange.com/questions/66374/is-it-possible-to-create-ogc-wms-service-based-on-the-arcgis-mxd-file-and-data-i>,
>>> to ask for help.
>>>
>>> And someone tell me I can use Map Server.
>>>
>>> So I wonder if this is possible?
>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>
>>
>> --
>> -----------------
>> Andrea Peri
>> . . . . . . . . .
>> qwerty àèìòù
>> -----------------
>>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>


-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130722/ff0af907/attachment.html>


More information about the mapserver-users mailing list