cancel
Showing results for 
Search instead for 
Did you mean: 

get session null in custom portal app

Former Member
0 Kudos

hi everyone.

I migrated a project sap portal app 7.0 to 7.4 but when I deploy I got a session is null with name “vendorCode”  my code below:

IPortalComponentSession compSession = request.getComponentSession();

javax.servlet.http.HttpSession httpSession = null;

httpSession = compSession.getHttpSession();

                             

if(httpSession != null && httpSession.getAttribute("vendorCode") != null)

{

vCode = (String)httpSession.getAttribute("vendorCode").toString();

}


httpSession.getAttribute("vendorCode") has always null


Where we get from “vendorCode” ? is it get from properties iview and we can configure iview properties with nam  “vendorCode” ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Hoang21,


I am also experiencing the exact same issue while upgrading portal from 7.0 to 7.4. Did you find solution to your problem? If yes, can you please share the solution?


Thanks,

Sameer

Former Member
0 Kudos

in my case: getAttribute(userID+"vendorCode")  get session is successful.

Or

other sap portal app setAttribute so i must run it before i run current app, at that time current app get session is not null.

0 Kudos

Hi,

I am not sure what is the "vendorCode" or who puts it on the session.

however, I believe that what you are looking for is the IRJ session meaning instead of using

httpSession = compSession.getHttpSession();

you should use

httpSession = request.getServletRequest().getSession();

Hope this helps,

BR,

Saar