iZone Infotech wrote:

This seems to confirm my suspicion that the servlet and JSP are in two
contexts/applications, see below.

> My problem with jsp-servlet-jsp is still there(titled 'Sessions').  I have
> hosted it on a server which uses JSERV.

Not just JServ, I assume, because Apache JServ by itself doesn't support JSP.

> The following is the exact code of 3 programs.  Please check it and let me
> know what is going wrong. [...]
>
> call.jsp: http://www.winaquiz.com/jsp/call.jsp

Do you have a web application mapped to the "/jsp" prefix?

> [...]
> call.jsp:
> --------
> <%@ page language = "java" %>
> <html>
> <%
>  session.putValue("name1","dantus1");
>  session.putValue("name2","dantus2");
>
> response.sendRedirect(response.encodeRedirectUrl("http://www.winaquiz.com/se
> rvlet/VServlet"));
> %>

Here you use the URI "/servlet/VServlet", i.e you ask the default application
to execute it. If you have a "/jsp" application as well, this means that the
servlet is part of one application, and the JSP page is part of another. Hence,
session data set by one is not seen by the other.

> [...]

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to