----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Hi Doyle,
Just a thought:
-the session is maintened by a cookie wich is passed in the header.
-maybe your wap browser doesn't support retrieving and sending back headers
Try to swich session mainainece to URL rewriting (somewhere in jserv config
files)
and use:
String endodedurl=res.
encodeRedirectUrl("http://localhost/servlets/ServletB");
res.sendRedirect(encodedurl);
hope it helps,
Andras.
----- Original Message -----
From: Doyle, Aidan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 12, 2000 11:47 AM
> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files. Don't make us guess your problem!!!
> ----------------------------------------------------------------
>
> We have the following problem when connecting to JServ using WAP devices.
>
> We have 2 servlets ServletA and ServletB. ServletA calls ServletB as
follows
>
> ServletA
> public void doGet(HttpServletRequest aRequest, HttpServletResponse
> aResponse)
> throws
> ServletException
> {
> HttpSession ses = aRequest.getSession(true);
> ses.putValue("USERNAME", aRequest.getParameter("USERNAME")); // Fine
> String sesId = ses.getId(); // Fine
> aRequest.sendRedirect("http://localhost/servlets/ServletB");
> }
>
> ServletB
> public void doGet(HttpServletRequest aRequest, HttpServletResponse
> aResponse)
> throws
> ServletException
> {
> HttpSession ses = aRequest.getSession(true);
> String sesId = ses .getId(); // Different sessionId
> String name = (String)ses.getValue("USERNAME"); // Username gone
> }
>
> Everything is fine in ServletA but session Id is different in ServletB.
> All this code works fine with a normal browser and all works fine using
> servletrunner (as shipped with JBuilder).
> Can anyone tell us what we're doing wrong.
>
> Thanks
> Aidan Doyle
>
>
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Archives and Other: <http://java.apache.org/main/mail.html>
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]