[opencms-dev] Session setAttribute() Problem

Olli Aro olli_aro at yahoo.co.uk
Thu Nov 4 15:15:42 CET 2004


You have header <%@ page language="java" import ="java.util.Enumeration"
session="true"%> in your second page which sets creates a new session
clearing the old one. Try to set session="false" or leave it out completely.

Regards,

Olli

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of luca.bonzagni
Sent: 04 November 2004 13:48
To: opencms-dev at opencms.org
Subject: [opencms-dev] Session setAttribute() Problem

Hi,
I'm tring to send information from one page (PAGE 1) that is out of opencms
into one (PAGE 
2) that is inside the content managment.

To do that I'm using the session.setAttribute() method but the PAGE 2 inside
opencms receive 
value = null.
Any idea?

Here the code of the two pages:

PAGE 1:  out of OPENCMS
____________________________________________________________________________
______
<%@ page 	language="java" import ="java.util.Enumeration"
session="true"%>

<% 	
	String url = "url";
	session.setAttribute( "url", url);
%>

<HTML>
<BODY>
<A HREF="http://xxx.xxx.com/opencms/opencms/xxx/it/test">CLICK LINK</A>
</BODY>
</HTML>
____________________________________________________________________________
______



PAGE 2:  inside OPENCMS
____________________________________________________________________________
_______
<%@ page language="java" import ="java.util.Enumeration" session="true"%>


<HTML>
<BODY>
Hello, <%= session.getAttribute( "url" ) %>
</BODY>
</HTML>
____________________________________________________________________________
_______

the result of Page 2 is :
Hello null

Why?

Why this pages are working outside opencms,
but doesn't work if Page1 is inside the server and PAGE 2 inside opencms
inside the same 
server?



Thanks 
Luca.
________________________
Ing. Luca Bonzagni
e-mail: luca.bonzagni at freefile.it
FreeFile S.r.l.
Via Margotti, 10
Casalecchio di Reno(BO)
Cel. (+39)349.21.45.046
www.freefile.it



_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.786 / Virus Database: 532 - Release Date: 29/10/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.786 / Virus Database: 532 - Release Date: 29/10/2004
 




More information about the opencms-dev mailing list