----------------------------------------------------------------
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]

Reply via email to