Home arrow static arrow Java Programming [Archive] - Session problem
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Session problem
This topic has 1 reply on 1 page.

Posts:474
Registered: 3/12/04
Session problem  
Aug 9, 2004 1:51 AM



 
Hi,
I developed a way to retrieve mails using JavaMail API.In that there is a provision to download/recieve/delete mails,attachments etc.
In Inbox after every mail there is a checkbox with caption as Delete,the values of which are retrieved when Delete button is clicked.
Problem is that when i click delete,the process is successful.It works on closing browser window also.
All parameters of checkboxes are retrieved.

But as soon as i download an attachment,request.getParameter() start giving me null values.It also starts
happening even on closing browser window and opening again.

Here is one way i tried which also didn;t worked
saveAttachment(p);if (session.isNew() == true) {session.invalidate();session = request.getSession(true);}if (session.isNew()==true) {session.setAttribute("varA",user);session.setAttribute("varB",passwd);session.setAttribute("varC",sm);session.setAttribute("varD",host);session.setAttribute("varE",ad);}


The setAttribute replenishes my mail configurtion settings for new session so that i can become valid to reopen my inbox in new session which also works fine.


 

Posts:474
Registered: 3/12/04
Re: Session problem  
Aug 9, 2004 2:57 AM (reply 1 of 1)



 
the minor mistake in code was
if (session.IsNew == false) at first  time

output remains same ie null values by request.getParameter() once an attachment is downloaded.
 
This topic has 1 reply on 1 page.