<%
String sessionId = request.getParameter("SESSION");
String mapName = request.getParameter("MAPNAME");
try
{
// --------------------------------------------------//
// Basic initialization needs to be done every time.
MapGuideJavaApi.MgInitializeWebTier(webconfigFilePath);
// Get the user information using the session id,
// and set up a connection to the site server.
MgUserInformation userInfo = new MgUserInformation(sessionId);
MgSiteConnection siteConnection = new MgSiteConnection();
siteConnection.Open(userInfo);
// Get an instance of the required service(s).
MgResourceService resourceService = (MgResourceService) siteConnection.CreateService(MgServiceType.ResourceService);
// Finished basic initialization.
// --------------------------------------------------//
// Query the spatial reference system used for the map.
MgMap map = new MgMap();
map.Open(resourceService, mapName);
String srs = map.GetMapSRS();
// Format it and display it in the task pane.
out.println("
Map " + map.GetName() + " uses this reference system: