I am using ULC 2008 
We have an embedded ULC application in our servlet based system. 
Sometimes when calling ServletContainerContext.getHttpSession(); the 
HttpSession doesn't seem to contain all the same information as the jsp. for 
example, on the jsp I have the following code 

------- jsp code ----------------------- 
<script language="JavaScript"> 
alert('<%=session.getAttribute("userinfo")%>'); 
</script> 
<applet.....................> 
</applet> 
------------------------------------------ 
This alert always outputs and alerts: 
alert('com.tomax.ewm.common.useri...@7ab825'); 

This jsp page serves up the ULC application. 
---------------ulc application code ------- 
public void initialize() { 


session = ServletContainerContext.getHttpSession(); 
fTimeCardsHelper = new TimeCardsHelper(session); } 

public TimeCardsHelper(HttpSession session2) { 



this.session = session2; 

userInfo = (UserInfo)(session.getAttribute("userinfo")); 

sessionID = userInfo.sessionID; 
} 
----------------------------------------------- 


At times, the userInfo variable is null in the ulc application code, but is 
never null in the jsp. Because of this, it is null it is throwing a 
NullPointerException at times. 
Is there some reason the HttpSession would be different sometimes between the 
jsp and the ulc code? 

BJ Tenney 
Java Developer 
Tomax Corporation 

Reply via email to