You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "HOOI Tak Keong, Henry" <tk...@my.ncs-i.com> on 2001/12/02 13:44:16 UTC

Session lost in IIS / Tomcat configuration.

Hi all, 
I would like to post a question to the community that I am hoping some of
you may have encountered and know the solution to.
Based on the project requirements, we have to use IIS as our Web Server and
Tomcat to run as a servlet container.
The problem I am facing is that the session can't seem to be maintained,
after moving from our login page to the second page.
At the moment, I used the url mapping feature to map all commands that end
with a (*.do) extension to the central Controller servlet. Based on the
command, e.g. (Login.do) for login page, the servlet will load the
corresponding jsp page, called A.jsp, which is actually a frame, that loads
other pages, B.jsp and C.jsp respectively. However, I have tested out and
found that the value of sessionId in the A.jsp file is always different than
the sessionId on B.jsp, indicating that request sent to the server are
somehow not being interpreted/and redirected to the servlet container
properly; and I also ensured that all cookies were allowed by the browser
while doing this test.
To fully ensure that sessionId returned by the Tomcat container is similar
to the one sent back via request, I decided to use url encoding,(via the
response.encodeURL() method) but found that IIS could not map the encoded
url with the values I had set in the uriworkermap.properties file.
The encoded url looked like below:
<frame name="leftFrame" scrolling="AUTO" noresize
src="mPlanningLogistic/inc-webpage/sidenav.jsp;jsessionid=zf6stluck1">

Below is a listing of the mappings for IIS-Tomcat defined in the
'uriworkermap.properties' file.
----------------------------------------------------------------------------
-------------------
/MyProject/servlet/*=$(default.worker)
/MyProject/*.jsp=$(default.worker)
/MyProject/*.do=$(default.worker)
/MyProject/*=$(default.worker)

Hence, I was wondering if any of you knew anything that I may have
overlooked that could help solve this session problem I am facing. 
The funny thing though, is that I created another 3 jsp pages, all linked to
one another(just to test if the issue was really a bad mapping), that did
not use any commands (*.do) extensions. That means, all I just did was pass
a parameter from A.jsp, which had link to B.jsp (in there I saved the
request parameter to the session and displayed it on page), and which had a
link to C.jsp, where I displayed the same value in the session again, and it
worked perfectly....indicating that a single session was used and maintained
throughout the navigation process. But, then this just drove me nuts because
if the .jsp extension can work how come not a *.do one?
Am I making any sense? Anyway, I would really appreciate it if any of you
may have any ideas or comments about my problem...
Thanks in advance.
Cheers'
Henry
The current setup of the system is:
----------------------------------
Web Browser: IE 5.5 Sp1
Web server: IIS 5.0
Servlet Container: Tomcat 3.2.3

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>