Click to See Complete Forum and Search --> : proxy problem?


netsky007
03-30-2003, 10:05 PM
When i use JSP's session in the proxyed webserver via apache's
mod_proxy, I can't get the session value,it is why?

(client--->proxy(apache mod_proxy)--->webserver)

If I use ASP's session, the problem does not exist.


Who can tell me, thanks.

rk74
04-06-2003, 04:33 AM
You have to ensure the method used by the ASP and JSP to track the sessions … is using cookies or by hidden fields in forms …. I think that they implement that in different ways …

netsky007
04-06-2003, 09:27 PM
test.jsp

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>

<%@ page language="java" import="java.sql.*" %>
<%@ page contentType="text/html;charset=ISO8859_1" %>
<%@ page import="java.io.*" %>
<%@ page import="java.lang.*"%>
<%@ page info="database handler"%>
<%@ page import="java.util.*"%>
<%@ page import="javax.servlet.*"%>
<%@ page import="javax.servlet.http.*"%>
<%@ page session="true" %>
<%
session.setAttribute("xiao4","ok");
%>

<a href="test1.jsp">next</a>
</body>

</html>






test1.jsp

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">


</head>

<body>

<%@ page language="java" import="java.sql.*" %>
<%@ page contentType="text/html;charset=ISO8859_1" %>
<%@ page import="java.io.*" %>
<%@ page import="java.lang.*"%>
<%@ page info="database handler"%>
<%@ page import="java.util.*"%>
<%@ page import="javax.servlet.*"%>
<%@ page import="javax.servlet.http.*"%>
<%@ page session="true" %>
<%
String aaa= (String)session.getAttribute("xiao4");

out.print(aaa);
%>
</body>

</html>