About JSP Publishing Map services

Source: Internet
Author: User
Tags contains object model query requires client tomcat
JS <b> about JSP publishing map Services </b>
First, we introduce the arsims for publishing the map service.
Arsims is a multi-layer architecture composed of the presentation layer, Business logic layer, the data layer, and it also has an application set for managing map Web publishing.
(1) The presentation layer is a ARCIMS client that can obtain, browse and analyze geographic data (geographic)
(2) Business logic layer components for request processing and ARCIMS Web page management
(3) The data layer contains all arcims available sources
(4) Application set for business logic layer authoring, designing,adminisering ArcIMS Service provides portal

The business logic layer is the core of the entire arcims and is the intermediate process responsible for interaction between the client and the data source, including service initiation and processing requests (request) and reactions (response).
A process for processing a request is:
When a request containing a geo-data analysis arrives at webserver (Tomcat,iis, etc.) from the client, webserver needs to route the request to ArcIMS application Server, which is a background-executing program that passes the request to the ArcIMS Spatial server and lists the services that ArcIMS spatial server is running. The latter processes the request, returns a response, this response to the client in reverse order, the client resolves
(parse) and rendered.
In this process, because webserver requests from the client may be multilingual, the interaction between ArcIMS application Server and ArcIMS Spatial server is through Arcxml (an Implementation of XML used with ArcIMS). So there needs to be a ArcIMS translator between webserver and Application Connector server, ArcIMS has four optional connector:
ArcIMS Servlet Connector ArcIMS default connector,html, Java Custom, and Java Standard views are available. ArcIMS with Arcexplorer, ArcMap, and Arcpad also use this connector.
ArcIMS ColdFusion Connector Don't understand
ArcIMS ActiveX Connector Support ASP
ArcIMS Java Connector Support JSP

What's the connector? In addition to having a choice of development language, there are performance issues (i.e., client Side versus Server Side processing).
Choose ArcIMS Servlet Connector, is the client Side processing, should be called "fat customer" bar, the client produces direct arcxml form of the request, Connector no analytic effect, Simply passing arcxml requests and responses, the client needs to parse the Arcxml response to render the map.
Choose Java Connector, is so-called "thin customer", all the processing of arcxml, including request and response, are done on the server side. The JSP passes a request, webserver first accepts the request, the Java connector translates the request to Arcxml, and then passes it to application Server and ArcIMS Spatial server. When ArcIMS Spatial server generates a response, the original way back to the Java connector, the Java connector the Arcxml form of the response to translate the response to the JSP, and then pass webserver to the client, and dynamically update JSP.

It is obvious that using the Java Conector client is much faster because the vector data for the map is large, and all requests and responses will affect performance on the client side.



The following is a discussion of two forms of publishing a map page using JSP.
Using the Java framework to publish arcims requires a javavm,webserver and servlet engine. On my computer, I use the Java1.4sdk,tomcat,java Connector.
Because I do not know the servlet deeply, I would say a little of my own opinion, in order to make a point.
<b>servlet is embedded in webserver, which connects JAVAVM and webserver through a set of servlet APIs to complete processing of requests containing Java languages such as JSPs .</b> Therefore, the JAVAVM cannot use the JRE (Java Runtime enviroment) because it runs only Java class files, does not compile, and requires JDK (Java developing Kit).
The ARCIMS has its own Java Connector, which is in the form of. jar, and should be placed under the Lib file under Web-inf when used.

The Java Connector has a set of JavaBean and a JSP Tag library. The overall function is to translate JSP request into arcxml.
These javabean are possible to write stand-alone and reusable components. They all have a series of well encapsulated set, get method, we can use these javabean and their methods to realize the map of various display functions, draw map symbols (dots, lines, etc.), add dynamic layers, query the relevant data , management and authentication services, and so on, my understanding is that geo-mapping software, such as ArcGIS, can do the same, and in these javabean can find the appropriate method. These JavaBean constitute the ArcIMS Java Connector Object Model.
The JSP tag Library is a collection of JSP tags built on the arcims Java Connector object model. These tokens provide an object Model interface. We can think of this tag as a connector in Javaconnector. Because it connects JSP and JavaBean. The JSP request written by this markup language tag is converted from the JSP tag library to an object that JavaBean can recognize, These javabean then convert the request into Arcxml.
The JSP tag library contains the name of the tag (tag), attributes, and nested tags (tag).
Here is a JSP Tag library using JSP example, can use JSP to publish a map has amplification function.

example.jsp
<% @page contenttype= "text/html"%>
<% @taglib uri= "Arcims_taglib.tld" prefix= "aims"%>
<%
String themapaction = Request.getparameter ("MapAction");
String x = Request.getparameter ("map.x");
String y = request.getparameter ("map.y");

String Mapmaxx =null;
String Mapmaxy =null;
String Mapminx =null;
String Mapminy =null;

if (Request.getparameter ("Maxx")!= null) {
if (!request.getparameter ("Maxx"). Equalsignorecase ("")) {
Mapmaxx = Request.getparameter ("Maxx");
Mapmaxy = Request.getparameter ("Maxy");
Mapminx = Request.getparameter ("Minx");
Mapminy = Request.getparameter ("Miny");
}
}
%>

<aims:tcpconnection id= "myconnection" host= "localhost" port= "5300" debug= "true"/>
<aims:mapservice id= "Mymapservice" connectionid= "name=" netuniversity "loadenvelope=" False "loadextensions=" false "loadrecordset= false" loadrenderer= "false"/>
<aims:map id= "Mymap" serviceid= "<%=myMapService%>" width= "" "height=" "envelope=" Myenvelope ">
<%
if (Request.getparameter ("Maxx")!= null) {
if (!request.getparameter ("Maxx"). Equalsignorecase ("")) {%>
<aims:envelope minx= "<%=mapMinX%>" miny= "<%=mapMinY%>" maxx= ">%=mapMaxX%<" maxy= "<%= Mapmaxy%> "/>
<%
}
}

if (themapaction!= null) {
if (Themapaction.equals ("ZoomIn")) {
%>
<aims:zoom factor= "2" x= "<%=x%>" y= "<%=y%>"/>
<%
}
}
%>
</aims:map>

<p align= "center" >
<form action= "example.jsp" method= "POST" >
<table border= "1" cellpadding= "5" width= ">" align= "center"
&LT;TR&GT;&LT;TD align= "center" >
<input type= "image" Name= "map" src= "<%=myMap%>" >
</td></tr>
</table>
<input type= "hidden" name= "MapAction" value= "ZoomIn" >
<input type= "hidden" name= "Maxx" Value= "<%=myenvelope.getmaxx ()%>" >
<input type= "hidden" name= "Maxy" value= "<%=myenvelope.getmaxy ()%>" >
<input type= "hidden" name= "Minx" value= "<%=myenvelope.getminx ()%>" >
<input type= "hidden" name= "Miny" value= "<%=myenvelope.getminy ()%>" >
</form>
</p>
</body>


Using JSP to publish the map advantage is obvious, connect oacle database only write a database connection JavaBean can realize, also can read symbol on the map information as the query condition, the prospect of imagination is beautiful.

Write here for the time being, because the JavaBean more in the library, the related method is not clear, perhaps is clear method cannot write the procedure, now very depressed. And please everyone, especially the seniors give me guidance maze.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.