<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I am using the Spring framework on top of the jsp page as the
controller mechanism. Before hitting the jsp page, the url accesses
the Spring controller which sets up the mgSessionId for the MapGuide
session.<br>
My application has a HttpSession object that holds the mgSessionIds for
the user. If there is a mgSessionId in the HttpSession object, the
controller knows the user has already accessed the map before so
instead of doing a site.CreateSession(), it will instead use the
mgSessionId stored in the HttpSession object.<br>
<br>
I need this behavior because I have a mapping application that spans
two maps. The user clicks on objects in Map1 and it will take them to
Map2, and then back. I wanted the user to still obtain their session
from Map 1 when the jump back and forth between maps. Doing this I
dont need to modify the mainframe.jsp page, and the additionally
logic/code is all in my own controller java class that I have control
over.<br>
<br>
-scott<br>
<br>
<br>
Chris Gountanis wrote:
<blockquote cite="mid000001c71a17$3a256e10$17d167d1@domain.local"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=us-ascii">
<div><span>What we do in Coldfusion is set a session variable that
can be accessed server side anytime. That and the MapName is the only
variables needed for a successful viewer hack. The rest can be passed
as URL query string. Sure the concept is the same in JSP. Anyone know
if there is a fprint equivalent in Coldfusion so we can use the
templates more effectively?</span></div>
<div> </div>
--<br>
Chris<br>
<div> </div>
<br>
<div lang="en-us"> <b>From:</b> Trevor Wekel
[<a class="moz-txt-link-freetext" href="mailto:trevor.wekel@autodesk.com">mailto:trevor.wekel@autodesk.com</a>] <br>
<b>Sent:</b> Wednesday, December 06, 2006 7:55 PM<br>
<b>To:</b> Scott Reisdorf; <a class="moz-txt-link-abbreviated" href="mailto:users@mapguide.osgeo.org">users@mapguide.osgeo.org</a><br>
<b>Subject:</b> [mapguide-users] RE: Question about map.Create and
map.Open() on the mapframe<br>
<br>
</div>
<div><span> Hi Scott, </span></div>
<div><span> </span> </div>
<div><span> mapframe.jsp should only be called when a complete
refresh of the page is requested by the browser. The page refresh was
intended to get a new copy of the map so the Create() call is
appropriate. If a user wants to refresh just the map pane they can
right click in the pane and hit refresh. A Refresh Icon can also be
added to the WebLayout toolbar. </span></div>
<div><span> </span> </div>
<div><span> User sessions were not intended to go beyond the lifetime
of the browser session. Certainly it is possible to do as you have
found out with modifying mapframe.jsp. Just out of curiosity, how did
you get around the CreateSession() in mainframe.jsp? </span></div>
<div><span> </span> </div>
<div><span> Thanks, </span></div>
<div><span> Trevor </span></div>
<br>
<div lang="en-us"> <b>From:</b> Scott Reisdorf
[<a class="moz-txt-link-freetext" href="mailto:scottreisdorf@hotmail.com">mailto:scottreisdorf@hotmail.com</a>] <br>
<b>Sent:</b> Friday, December 01, 2006 9:26 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:users@mapguide.osgeo.org">users@mapguide.osgeo.org</a><br>
<b>Subject:</b> Question about map.Create and map.Open() on the
mapframe<br>
<br>
</div>
All,<br>
I have a questions about loading a map from a saved MgSession. I
also think there is a possible bug in the mapframe.jsp page that
prevents the page from loading a map saved in an open MgSession<br>
<br>
In the mapframe.jsp the page always calls map.Create() forcing a new
Map to be drawn, even if the calling Session already has a Map object
associated to it with the same name. Shouldn't the mapframe.jsp page
do a check to see if the map has been created to the calling MgSession
and call a map.Open() rather then a map.Create() so that the map will
have the proper layers saved in the users session?<br>
<br>
I want to have the users map and dynamic layers persist throughout
their MgSession, but with the current code when the users accesses the
main page it always creates a new map (map.Create()), rather then doing
a check and a map.Open(). When I changed this code, the application
performs as expected and loads in the proper map for the users
MgSession. <br>
<br>
Any help is much appreciated.<br>
<br>
Thanks,<br>
-scott<br>
<br>
</blockquote>
</body>
</html>